An exception occurred in shop's script

  • Error type: MySQL Error
  • Source, line: Parser::tws_shop_topic[1289]
  • Error message: 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 'id IN(187,188,190,191,192,193,194,195,196,197,199,200,201,202,204,205,209,9474,1' at line 23
 SELECT DISTINCT id
                        FROM (
                            SELECT s.id
                            FROM ms_store s, ms_topic_store ts
                            WHERE s.no_visible=0
                                AND s.kind_key = 'kDefault'
                                AND s.price2 > s.price
                                AND s.price > 0
                                AND ts.store_id = s.id
                            UNION ALL
                            SELECT s.id
                            FROM ms_store s
                                JOIN ms_topic_store ts ON s.id = ts.store_id   
                                JOIN ms_disc_group dg ON s.disc_group_id = dg.id  
                                JOIN ms_disc_rate dr ON dr.group_id = dg.id
                            WHERE dr.kind_key = 'kOrder'
                                AND dr.from_sum = 0
                                AND dr.begin_time < '2024-04-20 17:20:06'
                                AND dr.end_time > '2024-04-20 17:20:06'
                                AND (s.price - (s.price / 100 * dr.disc_proc)) < s.price
                                AND s.no_visible = 0
                                AND s.kind_key = 'kDefault' 
                        ) AS tblWHERE id IN(187,188,190,191,192,193,194,195,196,197,199,200,201,202,204,205,209,9474,10765,10782,28616,28617,28618,28619,28620,28621,28623,28624,28625,28627,28628,28629,28630,28631,28632,28633,28634,31167,60255,68020,68021,68022,68023,68024,68025,68026,68027,68028,68029,68030,68031,68032,68033,68034,68035,68036,68037)