note 50870 deleted from function.mysql-affected-rows by danbrown
| From: | danbrown@php.net | Date: | Tue, 28 Apr 2009 01:50:43 +0000 |
| Subject: | note 50870 deleted from function.mysql-affected-rows by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-153877@lists.php.net to get a copy of this message | ||
Note Submitter: jeroen_vde at hotmail dot com
----
If you want to delete all in table, and get number of affected rows back use a delete statment of
this form:
mysql> DELETE FROM table_name WHERE 1>0;
Note that this is much slower than DELETE FROM table_name with no WHERE clause, because it deletes
rows one at a time.
Source: MySQL Reference Manual "Delete Syntax"