Re: To check for existing user in database

From: Date: Fri, 16 Jan 2009 13:53:13 +0000
Subject: Re: To check for existing user in database
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-286497@lists.php.net to get a copy of this message
At 11:01 PM -0800 1/15/09, Lars Torben Wilson wrote:
2009/1/15 tedd <tedd.sperling@gmail.com>: You want to use mysql_num_rows() there instead of mysql_affected_rows(). (Just a typo in this case, I suspect, but for the benefit of the less experienced it's worth pointing out.) For the newer PHP users, mysql_num_rows() tells you the number of rows you found with a SELECT query, while mysql_affected_rows() tells you how many rows you affected with an INSERT, UPDATE, REPLACE INTO, or DELETE query. Regards, Torben
Good catch. Thanks, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#286497) next »