發生錯誤:
string(228) "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND sid IN (SELECT aa_data_sid FROM `allarticle` WHERE unitcode = 'm4_s1') ...' at line 1"
SQL語法:
SELECT * from memberevents where 1 AND onlinedate < '2024-03-29 16:12:42' AND offlinedate > '2024-03-29 16:12:42' AND isshow = 1 AND approved = 1 AND trans_for_sid=0 AND mbsid = AND sid IN (SELECT aa_data_sid FROM `allarticle` WHERE unitcode = 'm4_s1') OR onlinedate < '2024-03-29 16:12:42' AND offlinedate = '' AND isshow = 1 AND approved = 1 AND trans_for_sid=0 AND mbsid = AND sid IN (SELECT aa_data_sid FROM `allarticle` WHERE unitcode = 'm4_s1') AND approved = 1 order by istop DESC, sort DESC