Right now I have a PHP file that does a MYSQL query and then counts rows like this:
$count=mysql_num_rows($result);
if ($count == 1) {
$message = array
If you are not using prepared statements then try:
$find = $dbh->query('SELECT count(*) from table');
if ($find->fetchColumn() > 0){
echo 'found';
}
However, if you choose prepared statements, which i highly recommend, then:
$find = $dbh->prepare('SELECT count(*) from table');
$find->execute();
if ($find->fetchColumn() > 0){
echo 'found';
}