note 89595 deleted from function.mysql-affected-rows by danbrown

From: Date: Mon, 16 Mar 2009 12:45:04 +0000
Subject: note 89595 deleted from function.mysql-affected-rows by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-151993@lists.php.net to get a copy of this message
Note Submitter: not at this dot com ---- dantebbs at tebbs dot org - you have made a common error in your post. mysql_affected_rows() expects a link_identifier and not a query result resource. you should pass the identifier aquired from mysql_connect() rather and the resource gained from mysql_query() <?php $dbc = mysql_connect (localhost, mydb, mypass); mysql_query("DELETE * FROM mydb.mytable WHERE 1"); echo mysql_affected_rows($dbc); ?>

« previous php.notes (#151993) next »