Answers for "print mysql error php"

PHP
4

php show error

error_reporting(E_ALL);
ini_set('display_errors', 1);
Posted by: Guest on August-07-2020
1

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
Posted by: Guest on June-02-2021

Browse Popular Code Answers by Language