MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:MySql Date:September 9 2008 10:06pm
Subject:Weird problem with mysql_query
View as plain text  
We are running MySql version 5.0.45-Debian_1ubuntu3.1-log Debian etch distribution under
If I submit the following query via mysql_query it acts as if the where is not there:

select count(*) as 'Count' from logins where player = 'aqwert';

this returns:

Submitting the same query at a MySql prompt works correcty:

mysql> select count(*) as 'Count' from logins where player = 'dawiz';
| Count |
|  6026 | 
1 row in set (0.00 sec)

Modifying the query to use a group by returns the correct count:

    Total    Count
    Total     6026

Is there something I should know about mysql_query and a simple count(*)?

G Vaughn

Weird problem with mysql_queryMySql10 Sep
  • Re: Weird problem with mysql_queryDarryle Steplight10 Sep
    • Re: Weird problem with mysql_queryAndy Shellam10 Sep