1andyw
11-12-2008, 10:56 PM
Resolved, thanks.
Hi,
I am dealing with an error in my syntax. My question is where does the error exist in relation to the error message?
This is the message:
Query FailedYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN category ON article.cat_id = category.cat_id WHERE
1064
This is the query:
$sql = "INSERT INTO `article` (heading,content,ord,cat_id) VALUES ('$heading','$article','$ord','$catId')
INNER JOIN category ON article ON article.cat_id = category.cat_id
WHERE
`category`.`cat_id`= $catId AND `page`.`page_id`=$pageId";
Thanks,
Andy
Hi,
I am dealing with an error in my syntax. My question is where does the error exist in relation to the error message?
This is the message:
Query FailedYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN category ON article.cat_id = category.cat_id WHERE
1064
This is the query:
$sql = "INSERT INTO `article` (heading,content,ord,cat_id) VALUES ('$heading','$article','$ord','$catId')
INNER JOIN category ON article ON article.cat_id = category.cat_id
WHERE
`category`.`cat_id`= $catId AND `page`.`page_id`=$pageId";
Thanks,
Andy