|
sentinel -> MySQL Inner Join issue (10/12/2005 12:42:30)
|
Hey all... I have been struggling with this JOIN statement for 2 days. Maybe you can see something I am missing. When I run this SQL SELECT tbltopic.forum_id, tbltopic.topic_id, tbltopic.subject, tbltopic.date, tblthread.thread_id, tblthread.topic_id, tblthread.username, tblthread.message, tblthread.message_date FROM tbltopic INNER JOIN tblthread ON tbltopic.topic_id = tblthread.topic_id where forum_id = " & request.form("forum_id") & " I get this error: Database Results Error Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 256' at line 1 Number: -2147217900 (0x80040E14) When I run the SQL this way SELECT tbltopic.forum_id, tbltopic.topic_id, tbltopic.subject, tbltopic.date, tblthread.thread_id, tblthread.topic_id, tblthread.username, tblthread.message, tblthread.message_date FROM tbltopic INNER JOIN tblthread ON tbltopic.topic_id = tblthread.topic_id where forum_id = '" & request.form("forum_id") & "' I get this error. Database Results Error Description: Column 'forum_id' in where clause is ambiguous Number: -2147217871 (0x80040E31) Source: Microsoft OLE DB Provider for ODBC Drivers The variable is being passed to the DRW via a hyperlink that sends the Forum_ID to it. http://hc-wxmp-rrwagn/forum_choice.asp?Forum_ID=1 Any Ideas?
|
|
|
|