August 13th, 2013, 01:24 PM
Join Date: Aug 2013
Time spent in forums: 28 m 11 sec
Reputation Power: 0
Mysql problem with inner join
I have a Joomla website and trying to update the category for some articles, based on tag selection.
There are two tables: table_items and table_tags
table_items has two columns: id and categoryID
while table_tags has two columns: tagID and itemID
These two tables are connected through id and itemID.
I have the following sql query
INNER JOIN `table_tags`
WHERE (`table_items`.`categoryID`=5) AND (`table_tags`.`tagID`=63);
...but I get this error:
#1064 - 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 'FROM `table_items` INNER JOIN `table_tags` ON `table_items`.`id`' at line 3
Any help will be highly appreciated! Thanks!