开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜