note 127549 added to mysqli.error
| From: | abderrahmanekaddour dot aissat at gmail dot com | Date: | Sun, 28 Aug 2022 09:33:34 +0000 |
| Subject: | note 127549 added to mysqli.error | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219490@lists.php.net to get a copy of this message | ||
<?php
// The idea is the add formated errors information for developers to easier bugs detection.
$myfile = fopen("database_log.log", "r");
$db = new mysqli("localhost", "root","root","data");
if(!$db->query("SELECT")){
$timestamp = new DateTime();
$data_err = " {
\"title\": \" Select statement error \",
\"date_time\": ".$timestamp->getTimestamp().",
\"error\":\" ".$db->error." \"
} "; // Do more information
fwrite($myfile, $data_err); // writing data
}
// In separate file do file read and format it for good visual.
$db->close();
fclose($myfile);
?>
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.173 (proxied: 129.45.46.49)
----
Manual Page -- https://php.net/manual/en/mysqli.error.php
Edit -- https://main.php.net/note/edit/127549
Del: integrated -- https://main.php.net/note/delete/127549/integrated
Del: useless -- https://main.php.net/note/delete/127549/useless
Del: bad code -- https://main.php.net/note/delete/127549/bad+code
Del: spam -- https://main.php.net/note/delete/127549/spam
Del: non-english -- https://main.php.net/note/delete/127549/non-english
Del: in docs -- https://main.php.net/note/delete/127549/in+docs
Del: other reasons-- https://main.php.net/note/delete/127549
Reject -- https://main.php.net/note/reject/127549
Search -- https://main.php.net/manage/user-notes.php