This is an old revision of the document!
replace *.* with schema.table if needed
*.*
schema.table
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
SELECT a.* FROM map_ads_categories m JOIN ads a ON (m.ad_id = a.id) WHERE m.category_id = 28;
SELECT * FROM map_ads_categories m JOIN ads a ON (m.ad_id = a.id) JOIN categories c ON (m.category_id = c.id) WHERE c.id = 28;