ords.php - L-10 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 'OR wh_id IN (SELECT wh_id FROM dic_user_wh WHERE user_id= AND can_inv=1)) ' at line 2 SQL:SELECT id, id as import_id, IFNULL(doc_num_int,0) as check_num, android_id, IFNULL(android_status,0) as status_id FROM doc_whinv WHERE curdate=CURDATE() AND IFNULL(android_id,'')<>'' AND (wh_id= OR wh_id IN (SELECT wh_id FROM dic_user_wh WHERE user_id= AND can_inv=1)) UNION SELECT 0, 0 as import_id, 0 as check_num, 'actwhost' as android_id, 0 as status_id FROM doc_actwhost WHERE curdate=CURDATE() AND wh_id=