| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Hank | Date: | January 24 2006 12:52am |
| Subject: | Re: count(*) send a wrong value | ||
| View as plain text | |||
My guess would that your PHP code is not written correctly. For instance, if you have a query in PHP: $sql="select * from my_table where cid=123"; ...and are using the PHP function mysql_numrows() to count the results, and then for your next test... you're just changing the query to: $sql="select count(*) from my_table where cid=123" and still using the mysql_numrows() to get the result, that is your error. You'll need to use mysql_result() or some other fetch function to get the results of the query. That's my guess. -Hank
| Thread | ||
|---|---|---|
| • count(*) send a wrong value | fabsk | 23 Jan |
| • Re: count(*) send a wrong value | mysql | 23 Jan |
| • Re: count(*) send a wrong value | Fabien SK | 23 Jan |
| • Re: count(*) send a wrong value | fabsk | 23 Jan |
| • Re: count(*) send a wrong value | Michael Stassen | 23 Jan |
| • Re: count(*) send a wrong value | Rhino | 23 Jan |
| • Re: count(*) send a wrong value | fabsk | 24 Jan |
| • Re: count(*) send a wrong value | Hank | 24 Jan |
| • Re: count(*) send a wrong value | Martijn Tonies | 24 Jan |
| • Re: count(*) send a wrong value | fabsk | 24 Jan |
| • Re: count(*) send a wrong value | Fabien SK | 24 Jan |
| • Re: count(*) send a wrong value | Fabien SK | 24 Jan |
