Invalid PDO query does not return an error

前端 未结 3 855
遇见更好的自我
遇见更好的自我 2021-02-08 00:24

The second SQL statement below returns an error in phpMyAdmin:

SET @num=2000040;
INSERT INTO artikel( artikel_nr, lieferant_nr, bezeichnung_1, bezeichnung_1 )
SE         


        
3条回答
  •  孤城傲影
    2021-02-08 00:48

    This is expected behavior. Since there are two statements and the first one is valid, you have to use nextRowset()

    try
      {
        $pdo_statement->execute();
        while ($pdo_statement->nextRowset()) {/* https://bugs.php.net/bug.php?id=61613 */};
      }
    

    Source: bugs.php.net/bug.php?id=61613

提交回复
热议问题