From: Ed Carp Date: March 19 1999 8:04pm Subject: Re: delete returns incorect number of deleted rows. List-Archive: http://lists.mysql.com/mysql/633 Message-Id: <004d01be7243$ac800940$74c9a8c0@traveler.airmail.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit >The manual clearly states that when deleting all rows MySQL recreates >the table as an empty table and can therefor not know how many rows that >were affected. It's not an bug, it's a feature. I've noticed this myself. It's easy enough to fix, I would think - "echo $query|sed -e 's/delete/select count(*)/g'|mysql $database" immediately comes to mind. In C, save whatever mysql_num_rows() returns, do the delete, then return the saved number.