a query :
$query=mysql_query(SELECT content_id, COUNT(*) FROM votingapi_vote WHERE value_type = option AND value = 1 GROUP BY content_id)
if i assign it to $result .
while ($obj = db_fetch_object ($result)) {
$output .= $obj->content_id.'<br>' . $obj->count;
}
how to output the count number? after the $obj->content_id. there is no number printed. thank you.
You need an alias for your column
COUNT(*)(i.e. rename the column) :Then use the variable :