note 117490 added to class.mysqli-sql-exception
| From: | arj dot 123 at hotmail dot es | Date: | Wed, 17 Jun 2015 20:42:44 +0000 |
| Subject: | note 117490 added to class.mysqli-sql-exception | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202889@lists.php.net to get a copy of this message | ||
Hi, I sorry mi English doesn't very good. I would like to know if my class is good. I read
about security if you use "MYSQLI_REPORT_STRICT" .
use mysqli;
mysqli_report(MYSQLI_REPORT_STRICT);
function conectar($host,$usr,$pw,$bbdd) {
try {
$db = new mysqli($host,$usr,$pw,$bbdd);
} catch (mysqli_sql_exception $e) {
echo $e->getCode().'<br>';
echo $e->getMessage();
}
mysqli_report(MYSQLI_REPORT_OFF);
return $db;
}
If somebody can help me, given some comment or some idea I could improve the class to do it safer I
would be grateful.
----
Server IP: 72.52.91.14
Probable Submitter: 81.203.224.131
----
Manual Page -- http://php.net/manual/en/class.mysqli-sql-exception.php
Edit -- https://master.php.net/note/edit/117490
Del: integrated -- https://master.php.net/note/delete/117490/integrated
Del: useless -- https://master.php.net/note/delete/117490/useless
Del: bad code -- https://master.php.net/note/delete/117490/bad+code
Del: spam -- https://master.php.net/note/delete/117490/spam
Del: non-english -- https://master.php.net/note/delete/117490/non-english
Del: in docs -- https://master.php.net/note/delete/117490/in+docs
Del: other reasons-- https://master.php.net/note/delete/117490
Reject -- https://master.php.net/note/reject/117490
Search -- https://master.php.net/manage/user-notes.php