diff options
-rw-r--r-- | it_dbi.class | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/it_dbi.class b/it_dbi.class index e4c3e2c..7b4594a 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -534,10 +534,13 @@ function query($query, $p = array()) $this->_affectedrows = $this->_link->affected_rows; # get_warnings() clobbers this if (($warning = $this->_link->get_warnings())) { - do - $messages[] = $warning->message; - while ($warning->next()); - it::error('title' => "Mysql warning: " . $messages[0], 'body' => join("\n", $messages) . "\n"); + do { + if ($warning->errno != 1364) + $messages[] = $warning->message . " [error $warning->errno]"; + } while ($warning->next()); + + if ($messages) + it::error('title' => "Mysql warning: " . $messages[0], 'body' => join("\n", $messages) . "\n"); } if ($writing && $this->_p['throttle_writes']) |