I'm running a query in phpMyAdmin and it works, however when i use the query in my php code i get an error message.
The query is:
SELECT category.id, category.name, LEFT(category.contents, 400), category.image FROM maincat, maincatcategory, category WHERE maincatcategory.maincatid=maincat.id AND maincatcategory.categoryid=category.id AND maincat.id='$id' ORDER BY category.corder
The error message is:
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 'Resource id #10'