This may be the wrong message board for this [apologies if it is], but if
any of you are PHP/MySQL gurus. Have been trying to get a particular MySQL
query to work the through PHP5 with out success.

I'll simplify my problem:

I have an MySQL query along the lines of ("SELECT x,y,COUNT(y),z FROM table
WHERE y LIKE '%*some text% *AND --*someotherstuff-- *GROUP BY y");

When i run this on the MySQL command line it works fine, when i run inside
my PHP file, it returns everything ok except the COUNT (y) value [Note y is
a string variable]....

I then go on  to run
*$result = mysql_query($query) or die ('cant run query'.mysql_error());*
*while ($row = mysql_fetch_assoc($result)) {
} etc etc...

*all my other queries in this file work perfectly.

When i put some checking code in it definately is returning blank/null from
MySQL for this count value

Is there something special with PHP and COUNT() MySQL functions im not
doing.....?? or does the problem lie on the MySQL side and how it treats PHP
requests for COUNT()?

I would appreciate any advice now cos now ive ran out of ideas!

-- 
Rgds
Paul

Reply via email to