SQLite via PDO - Find affected rows
Posted: Sun Oct 21, 2007 7:52 pm
Has anyone else come across SQLite not showing affected rows when using the prepare() / execute() method?
It returns a valid PDOStatement, and I can pull data on selects and so forth, however INSERTs and DELETEs all return 0 if I call rowCount().
Anyone worked with PDO SQLite before? Ever found this?
Cheers
Code: Select all
$test = $link->prepare('DELETE FROM tbl_admin_postcodes'); // $link is a valid connection
$test->execute();
echo "Affected rows: " . $test->rowCount(); // returns 0 though rows are removedAnyone worked with PDO SQLite before? Ever found this?
Cheers