Hi, i'm trying to select two values from my database.
$nc ='North Carolina';
$t ='Hello';
$q = 'SELECT COUNT(state, title) AS c FROM all WHERE state = "' . mysql_real_escape_string($nc) . '" AND title = "' . mysql_real_escape_string($t) . '"';
$rq = mysql_query($q);
$fetch = mysql_fetch_assoc($rq);
$count = $fetch['c'];
echo = "$count";
I need it so it will only echo out the number of posts from North Carolona and with the title Hello.
It doesn't echo out nothing.