php - Can I safely ignore MySQL error HY000 with error code 00000 -


i've set php (5.2) pdo (mysql 5.1) throw exceptions when error occurs:

$pdo = new pdo(...); $pdo->setattribute(pdo::attr_errmode, pdo::errmode_exception); 

now, exception tells me "hy000: general error". i've tried more info out of pdo, can that:

  • errorinfo(): array(0 => 'hy000')
  • errorcode(): array(0 => '00000')

the query fails looks this:

insert user_values select user_id,        attribute_id,        ?,        value    user_values   user_id = ?     , set_id = ? 

i've ensured cursors closed ($stmt->closecursor()). exception thrown when calling fetchall() on statement. after searching around found ignoring error, seems plain wrong dismiss pdo exception.

what do? have check "it's insert, there no result set ignore exception" (as don't have separate methods insert, select, update, ...).

error code 00000 means successful (or rather no error found).


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -