MySQL error:

MySQL Query Error: SELECT s.*,p.* FROM `modoer_subject` s, `modoer_subject_shops` p WHERE s.status=1 and s.aid= and s.pid=1 AND s.pid_top=1 AND s.sid=p.sid ORDER BY rand()
Mysql error description: 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 'and s.pid=1 AND s.pid_top=1 AND s.sid=p.sid ORDER BY rand()' at line 1
Mysql error number: 1064
Date: 2018-12-15 @ 09:08
Script: http://dianpu.vanpeople.com/item-list-catid-1-aid-19-order-finer-type-normal-num-100.html