MySQL Forums
Forum List  »  PHP

What PDO::exec really does return?
Posted by: leonid lecksunov
Date: February 05, 2016 06:10AM

from mainpage:PDO::exec — Execute an SQL statement and return the number of affected rows
my INSERT statement works fine. When I try:
echo 'affected rows: ', $db->exec(); - it returns '0', though 551 record was inserted really;
otherwise, when no record was inserted really it returns '1'

Options: ReplyQuote


Subject
Written By
Posted
What PDO::exec really does return?
February 05, 2016 06:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.