![]() ![]() But my function don't roll back the firs update. The firs that will update a row, and the second will affect 0 rows. This are the functions that i use: protected function beginTransaction() ![]() Then i commit all the querys in the array: public function commit() ![]() I want to execute all the query's in one transaction, so if one throw an error, the others rollback.įirs i create the update, delete or insert statement to run, and add the query with a function. The RowCount is zero, while RecordsAffected is. I create a PDO Database class to manage connections to the db, query's and transactions. For updating operations via PDOStatement the rowCount property should show number of affected rows Documentation Currently for MS SQL Server the rowCount() for successful updates returns 0. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |