Search number entries on a mysql database with COUNT
Posted
by skiria
on Stack Overflow
See other posts from Stack Overflow
or by skiria
Published on 2010-05-15T18:25:18Z
Indexed on
2010/05/15
18:34 UTC
Read the original article
Hit count: 246
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!
© Stack Overflow or respective owner