Re: To check for existing user in database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 11:01 PM -0800 1/15/09, Lars Torben Wilson wrote:
2009/1/15 tedd <tedd.sperling@xxxxxxxxx>:
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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux