The query could not be executed.

Query:
select p.product_id as id, product_rank as rank, 'product' as source from bda_products p where p.product_category_id = UNION ALL select r.resource_id as id, resource_rank as rank, 'resource' as source from bda_resources r where r.resource_category_id = order by rank asc

DB returned following error message:

Error number: 1064

Error message: 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 'UNION ALL select r.resource_id as id, resource_rank as rank, 'resource' as sourc' at line 1

Publications – Think Brick – A Brick Development Association Initiative

Publications

Select Category