Re: To check for existing user in database

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

 



At 10:36 AM -0600 1/16/09, Shawn McKenzie wrote:
mysql_num_rows() may make more sense, however mysql_affected_rows() will
work the same with a select.  The PHP mysql_affected_rows() calls the
MySQL mysql_affected_rows(), which states:

"For SELECT statements, mysql_affected_rows() works like mysql_num_rows()."

--
Thanks!
-Shawn

I guess that explains why my code is still working.

I had been using mysql_num_rows() to see if anything had been returned from a successful search, but had a problem of some sort. So, I started using mysql_affected_rows() and the problem vanished -- as such, that became my preferred method. However, I had been remiss in reading the manuals.

So after all of this, I plan of setting up tests and testing all combinations to see how this actually works. While the manual says one thing, it appears that the application can be a bit different. Of course, I could be wrong.

Cheers,

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