Help with select statment

This is a discussion on "Help with select statment" within the Classic ASP section. This forum, and the thread "Help with select statment are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 6th, 2005, 22:03
Junior Member
Join Date: Nov 2005
Location: Oklahoma city, OK
Age: 29
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to rocket468
Help with select statment

I would realy apriciate any help.

What I am trying to do is add a completly seperate Item to my bookmark page. So I have taken something that works 100% and just add another sub for entering data "which i have worken" and a sub for viewing saved plans "which i need help on"

I can't get My other set of data thats in the table PLAN_DETAILS" out. when plan_details.plan_id=bookmars.b_planId

Whats throwing me for a loop is the select statments.
I am confused of INNER JOIN and how that works.


Line 366 is where the extra sub starts.
Its all between the comments.
'###################### PHP plans #######################
http://www.professionalhouseplan.com/bookmark.txt
http://www.professionalhouseplan.com/php.mdb

www.professionalhouseplan.com/bookmark.asp?mode=default1
User:test
Pass:test

here is the select stament if you don't want to mess with the txt file
Code: Select all
strSql = "SELECT "& strTablePrefix & "Bookmarks.Bookmark_ID, "& strTablePrefix & "Category.Cat_Name, "& strTablePrefix & "Forum.F_SUBJECT, "& strTablePrefix & "Topics.Topic_ID, "& strTablePrefix & "Topics.T_subject, "& strTablePrefix & "Topics.T_Replies, "& strTablePrefix & "Topics.T_date, "& strTablePrefix & "Topics.T_Last_Post,"& strMemberTablePrefix & "MEMBERS.M_NAME "
    strSQL = strSQL & "," & strTablePrefix & "TOPICS.FORUM_ID, " & strTablePrefix & "TOPICS.CAT_ID, " & strTablePrefix & "TOPICS.T_LAST_POST_AUTHOR "
    strSql = strSql & "FROM ("& strTablePrefix & "Category INNER JOIN "& strTablePrefix & "Forum ON "& strTablePrefix & "Category.Cat_ID = "& strTablePrefix & "Forum.CAT_ID) INNER JOIN ("& strMemberTablePrefix & "Members INNER JOIN ("& strTablePrefix & "Bookmarks INNER JOIN "& strTablePrefix & "Topics ON "& strTablePrefix & "Bookmarks.B_planID = "& strTablePrefix & "Topics.Topic_ID) ON "
    strSql = strSql & strMemberTablePrefix & "Members.Member_id = "& strTablePrefix & "Topics.T_AUTHOR) ON "& strTablePrefix & "Forum.Forum_ID = "& strTablePrefix & "Topics.Forum_id "
    strSql = strSql & "WHERE ("& strTablePrefix & "Bookmarks.B_MemberID=" & getmemberID(strDBNTUserName) & ")"
    if lastDate <> "All" then strsql = strsql & " AND " & strTablePrefix & "TOPICS.T_LAST_POST > '" & lastDate & "'"
    rs.Open strSQL, my_Conn, 3

Last edited by rocket468; Dec 6th, 2005 at 23:44.
Reply With Quote

  #2 (permalink)  
Old Dec 6th, 2005, 22:06
Junior Member
Join Date: Nov 2005
Location: Oklahoma city, OK
Age: 29
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to rocket468
Re: Help with select statment

as soon as i post this my host goes down. if the links don't work give it afew, my host sucks.
Reply With Quote
  #3 (permalink)  
Old Dec 7th, 2005, 07:52
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Help with select statment

Can you please paste the SQL command AFTER it's been parsed?
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #4 (permalink)  
Old Dec 8th, 2005, 15:34
Junior Member
Join Date: Nov 2005
Location: Oklahoma city, OK
Age: 29
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to rocket468
Re: Help with select statment

I would i do that?
Reply With Quote
  #5 (permalink)  
Old Dec 8th, 2005, 15:55
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Help with select statment

ok... basically, just before executing your SQL, just response.write the SQL string and post that here instead of the above (I find that a lot easier)
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
Reply

Tags
help, select, statment

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
chained select box dependable select thenamenoonehastaken JavaScript Forum 0 Feb 8th, 2008 05:49
Flash: Need Help Writing An 'If' Statment Antwan Flash & Multimedia Forum 4 Oct 1st, 2007 21:21
unset SESSION in an IF statment Andy K PHP Forum 7 Apr 27th, 2007 19:02
CSS and select djme Web Page Design 1 Mar 2nd, 2006 02:05
Select a row and go! Please help? taymond JavaScript Forum 1 Nov 16th, 2005 15:50


All times are GMT. The time now is 20:52.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43