PDO exec doesn't return value on deletion of record
When I delete a record from the database, even w开发者_如何学Gohen it is successful, all I ever get is int(0). What am I doing wrong? The manual does not give an example of this with a procedure.
$foo = db::getInstance()->exec("CALL deleteUser(222)");
My hunch is that it has something to do with the fact that you are calling an SP instead of a 'regular' SQL query. I'm not too familiar with SP's, but maybe you should return the number of deleted rows from within the SP? Just a thought.
精彩评论