SQL Error : 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 'as value_id, as val FROM where goods_id in ( select distinct brand_id from dig' at line 1SQL: SELECT as value_id, as val FROM where goods_id in ( select distinct brand_id from digital_goods159) ORDER BY val