Search number entries on a mysql database with COUNT
- by skiria
I have a mysql database which allocate:
iid, name, description, url, namecategory, idcategory, nametopic, idtopic
How can i know the number of entries that has categoryid=1 and topicid=1?
I've try
$result = mysql_query("SELECT COUNT(id) FROM videos WHERE categoryid=1 AND topicid=1")
But it hasn't worked!