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('status' => 'ok');
} else {
$message = array('status' => 'error');
}
This works fine but I'm trying to change all my PHP files to use PDO. So how can this be done with PDO?