Laat de database tellen en haal de telgegevens op uit de query.
$result = mysql_query('SELECT COUNT(*) FROM `table` WHERE `field` = ...');
if (!$result) {
die(mysql_error());
}
if (mysql_result($result, 0, 0) > 0) {
// some data matched
} else {
// no data matched
}