Re: [PHP] count vs mysql_num_rows

2007-10-08 Thread tedd
At 12:47 PM -0700 10/8/07, Kevin Murphy wrote: Is this a joke? You are using a LIMIT 1, so your count is always going to be 1. No, its not a joke. The answer is not going to always 1, its going to be 1 (the value exists in the DB at least once) or 0 (the value doesn't exist in the DB), that'

RE: [PHP] count vs mysql_num_rows

2007-10-08 Thread Jay Blanchard
[snip] > Is this a joke? You are using a LIMIT 1, so your count is always > going to be 1. No, its not a joke. The answer is not going to always 1, its going to be 1 (the value exists in the DB at least once) or 0 (the value doesn't exist in the DB), that's what I am trying to test for. I

Re: [PHP] count vs mysql_num_rows

2007-10-08 Thread Kevin Murphy
Is this a joke? You are using a LIMIT 1, so your count is always going to be 1. No, its not a joke. The answer is not going to always 1, its going to be 1 (the value exists in the DB at least once) or 0 (the value doesn't exist in the DB), that's what I am trying to test for. I don't n

Re: [PHP] count vs mysql_num_rows

2007-10-08 Thread Jim Lucas
Kevin Murphy wrote: I've got a little function that just checks to see if something is in a mysql db. There are several ways to do this and was curious as to the best way. The following are 2 (simplified) versions that work just fine. If these are the best ways, which of the following is better

Re: [PHP] count vs mysql_num_rows

2007-10-08 Thread mike
On 10/8/07, Kevin Murphy <[EMAIL PROTECTED]> wrote: > I've got a little function that just checks to see if something is in > a mysql db. There are several ways to do this and was curious as to > the best way. The following are 2 (simplified) versions that work > just fine. If these are the best wa