按照楼上的说的改了
$R=$db->query("SELECT a.productname,a.sortid,a.arrival_date, b.sortid,b.sortname,b.class FROM vte_products a 
LEFT JOIN vte_sorts b ON a.sortid = b.sortid WHERE a.arrival_date='' ORDER BY a.arrival_date, b.class");但是还是提示游错误:
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 'Resource id #17' at line 1
Errno.: 1064