I have quiz website and I'm working on adding question and images, and every couple minute site stop working and show me this message
Fatal error: Call to a member function fetch_assoc() on boolean in /storage/ssd3/561/18376561/public_html/configs/connection.php on line 48
and this the code
];
# Tables' Prefix
define('prefix', 'pl_');
# No need to change anything bellow this line
$db = new mysqli($connect['HOSTNAME'], $connect['USERNAME'], $connect['PASSWORD'], $connect['DATABASE']);
if($db->connect_errno){
echo "Failed to connect to MySQL: (" . $db->connect_errno . ") " . $db->connect_error;
exit;
}
$sql_mode = $db->query("SELECT @@GLOBAL.sql_mode;");
$rs_mode = $sql_mode->fetch_assoc();
I want to continue to add questions and image as much as I want without interrupt me like this and waiting an hour to back working and keep repeating happen this problem over and over