How do i get a detailed error description during a php-mysql script run?
I have the following statements where the script fails and displays the custom error message - the contents of the "or die".
I want to get the actual error from MySQL (instead of the custom error i have mentioned), which would give better idea about the scenario - whether its a database issue or server connectivity issue etc..
this is the code i have where i need to enhance the error reporting
$query = "SELECT * FROM table_name";
$result = mysqli_query($db_conn, $query)
or die('Connected to database, but querying failed');
thanks!