Converted search to PDO