Ok, i've racked my brain on this for an hour, and I don't know what i'm missing....I'm trying to query a database and get a count of records by a goup. Here is my sql statement:
SELECT cname, count(cname) AS xtd_value FROM pluggins WHERE 1 GROUP BY cname;
Which does pull all records EXCEPT a few....If the cname contains a space, it completely ignores those records. For example:
It will pull:
BlueTurkey.com
BlueTurkey.com
BlueTurkey.com
as 3 records, but not show any for:
Blue Turkey
Blue Turkey
Blue Turkey.
Now, I tried to get a little fancy and do the query like:
SELECT cname, count(cname) AS xtd_value FROM pluggins WHERE 1 GROUP BY DISTINCT(REPLACE(cname,' ','');
And it got the Blue Turkey's....but then left out my BlueTurkey.com????
So what am I missing here..>I'm sure it's something simple.