What I was trying to do is inserting all query errors into a database, but, it doesnt work. I wanted to do this:
<?php
include('db_settings.php');
$query = $conn->query("mysql_query here");
if (!query) {
$error = $conn->error;
$log_error = $conn->query("INSERT INTO tab (log) VALUES ('$error')");
}
?>
However, this does not work, the error is not being submitted into the db. Does any of you know some workaround for this?
(before someone asks, all parameters of DB and variables are correct).