note 50870 added to function.mysql-affected-rows

From: Date: Sat, 12 Mar 2005 13:22:23 +0000
Subject: note 50870 added to function.mysql-affected-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-86321@lists.php.net to get a copy of this message
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" ---- Manual Page -- http://www.php.net/manual/en/function.mysql-affected-rows.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50870 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50870&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50870&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50870&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50870&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50870&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50870&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86321) next »