Let’s say that I have an error in a php/mysql query :
$query = "SELECT * ROM users WHERE _id = :user_id";
Here, FROM is missing an “F”.
When I launch this php file in localhost, my browser is not reacting, it should display something like that:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
But it doesn’t, only blank page…
How do I enable this option?
EDIT: I’m using PDO.
mysql_*functions you have to do something like:mysql_query($sql) or die(mysql_error());mysqli_*:mysqli_query($sql) or die(mysqli_error());PDO:$stmt->execute() or die(print_r($stmt->errorInfo)); //$stmt is instance of PDOStatemenIf you still use
mysql_*I strongly recommend to stop using (sql injection I mean).