Re: To check for existing user in database
| From: | tedd | Date: | Sun, 18 Jan 2009 16:47:22 +0000 |
| Subject: | Re: To check for existing user in database | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-286605@lists.php.net to get a copy of this message | ||
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! -ShawnI 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