SELECT p.id, p.price_full, p.price_nds, p.price_min, p.post_type FROM dbs5_tovar_price as p WHERE p.updated>'2016-08-22 23:08:58' and p.tovar_id= ORDER BY p.price_min LIMIT 1
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 'ORDER BY p.price_min LIMIT 1' at line 1