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(51412,51413,51985,51986,51987,51988,51989,51990,51991,51992,51993,51994,51' 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-27 11:52:58'
                                AND dr.end_time > '2024-04-27 11:52:58'
                                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(51412,51413,51985,51986,51987,51988,51989,51990,51991,51992,51993,51994,51995,51996,58611,61708,61709,61741,61742,61770,61771,61772,61795,61796,62355,62358,62359,62361,62363,62364,62365,62367,62368,62369,62452,62453,62454,62455,62456,62457,62458,65240,65241,65242,65243,65244,65245,65672,65702,65703,65704,65705,67315,67316,67317,67318,67319,67320,67321,67322,67323)