note 57253 added to function.sqlite-changes
| From: | bermiferrer:at-akelosdotCom at osu1 dot php dot net | Date: | Wed, 28 Sep 2005 13:02:28 +0000 |
| Subject: | note 57253 added to function.sqlite-changes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95924@lists.php.net to get a copy of this message | ||
When counting deleted records from the database, I realized that sqlite_changes() will return 0 if
you are deleting all the records without including a WHERE clause.
So after "DELETE FROM users" sqlite_open() will print 0 even if rows where deleted, but if
you use "DELETE FROM users WHERE 1" you will get the right result.
I had this problem on versions 5.0.4 and 4.4.0 under Windows servers.
----
Manual Page -- http://www.php.net/manual/en/function.sqlite-changes.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57253
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57253&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57253&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57253&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57253&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57253&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57253&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57253&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57253&report=yes
Search -- http://master.php.net/manage/user-notes.php