how to handle sql query error in php code example
Example: php mysql error
mysqli_query($this->db_link, $query) or die(mysqli_error($this->db_link));
# mysqli_query($link,$query) returns 0 if there's an error.
# mysqli_error($link) returns a string with the last error message