What about
"SELECT
ads.*,
ad_maincat.maincat_name,
ad_subcat1.subcat1_name,
ad_subcat2.subcat2_name
FROM ads
INNER JOIN ad_maincat ON ads.maincat_id = ad_maincat.maincat_id
INNER JOIN ad_subcat1 ON ads.subcat1_id = ad_subcat1.subcat1_id
INNER JOIN ad_subcat2 ON ads.subcat2_id = ad_subcat2.subcat2_id
WHERE ad_id = $_GET[ad_id]
AND approved='Y' ORDER BY submitted DESC";
Though this expects to always have a main_cat, subcat1 and subcat2. If these are not always present then switch the join to be a LEFT OUTER JOIN so that the ads record is always returned irrespective of the existing of if the categories have been assigned.
Though you should always check the $_GET variable is what you expect before putting it into a query..
Also have you read http://www.phpfreaks.com/tutorial/data-joins-unions