$rows = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) FROM x WHERE id='{$variable}' GROUP BY id"));
return $rows;
When i do a print_r($rows), i get an output which looks like this:
Array ( [COUNT(*)] => 2 )
What i want is the ‘2’, so i tried
print $rows[0];
which didn’t work. I tried:
print $rows[COUNT(*)];
which didn’t work either…
Any ideas?
Thx.
You can add alias using
ASkeyword. I given the name astotalNow you can get it
print $rows['total'];