|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-12 08:59 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 01:00:01 2025 UTC |
Description: ------------ I'm using the mysql function called: mysql_affected_rows(); now it has to give the number of the affected rows on UPDATE,INSERT,DELETE queries only! But it gives me the number of rows ever if I use SELECT query! thank you Reproduce code: --------------- <?php mysql_connect("localhost","nimce"); mysql_select_db("magazine"); mysql_query("SELECT * from users"); print mysql_affected_rows(); ?> there are 4 users! Expected result: ---------------- -1,because I used SELECT query Actual result: -------------- 4