give me this error in phpMyAdmin:
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 'table ON brand.seo_name = table.brandName ORDER BY b' at line 8
this is the query:
SELECT brand.name, brand.seo_name
FROM brand
JOIN (
SELECT IFNULL(product.brand, standard_product.brand) AS brandName
FROM product
JOIN standard_product
ON product.standard_product_id = standard_product.id
WHERE product.store_id = 1) AS table
ON brand.seo_name = table.brandName
ORDER BY brand.seo_name ASC
LIMIT 0,30