inv_pere.php - L-39 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 '' at line 5 SQL:SELECT id, 0 as is_ord, IFNULL(doc_num_int,0) as check_num, wh_id+1000000 contra_id, IFNULL(android_status,1) as status_id, IFNULL(to_wh_id+1000000,0) as contra_wh_id, android_id, IFNULL(notes,'') as notes, 0.0 as itog_summ, 0.0 as discount_summ, 0 as price_index, 0 as for_in_use, '' as user_name, '?' as time1, 0 as draft, 0 as by_contra_id, type_id FROM doc_whinv t1 WHERE curdate=CURDATE() AND type_id IN (100,9) AND wh_id=