![]() |
whats wrong with this query?
$article = $DB_site->query_first("SELECT article.*, articlepost.*, articlecategory.options AS categoryoptions FROM " . TABLE_PREFIX . "article AS article INNER JOIN articlepost AS articlepost ON(articlepost.postid = article.firstpostid) INNER JOIN articlecategory AS articlecategory ON(articlecategory.categoryid = article.categoryid) WHERE article.articleid = $a AND articlepost.type=1");
do u see anything wrong? the error im getting is that there is no such table 'My_Database_Name_Here.articlepost' im going nuts :ermm: |
I notice you haven't included the table prefix for the two inner joins.
|
so?
$article = $DB_site->query_first("SELECT article.*, articlepost.*, articlecategory.options AS categoryoptions FROM " . TABLE_PREFIX . "article AS article INNER JOIN " . TABLE_PREFIX . "articlepost AS articlepost ON(articlepost.postid = article.firstpostid) INNER JOIN " . TABLE_PREFIX . "articlecategory AS articlecategory ON(articlecategory.categoryid = article.categoryid) WHERE article.articleid = $a AND articlepost.type=1"); |
you need to format your code better when asking questions, it's easier to read ;)
PHP Code:
|
fixed version
PHP Code:
|
thx for the replies... all worked :D
|
All times are GMT. The time now is 11:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|