field: content_id, value=1 or value=0, value_type=option
table: votingapi_vote
1,output the content_id field and descending it, the rule is according to the value(the count of each content_id ‘s value=1 minus the count of each content_id ‘s value=0 ,each content_id has many value=0 or value=1). where the value_type=option
is there a way to get that?
namely:
$query1=mysql_query(SELECT content_id, COUNT(*) FROM votingapi_vote WHERE value_type = option AND value = 1 GROUP BY content_id)
$query2=mysql_query(SELECT content_id, COUNT(*) FROM votingapi_vote WHERE value_type = option AND value = 0 GROUP BY content_id)
i want to use the count value = 1 minus the count value = 0. this is the content_id’s descending rule,
For each content_id, the number of rows with value=1 minus the number of rows with value=0
1 Answer