lawrence_dev
asked on
Transitioning to PDO/MySQL. SELECT and COUNT statement - Die if no records
How do I fix this query to die (kill script) if no results imported?
$query18 = "SELECT * FROM Download";
$conn->query($query18);
$totalrecords=$conn->query('SELECT FOUND_ROWS()')->fetch(PDO::FETCH_COLUMN); // Get result count
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER