note 117490 rejected from class.mysqli-sql-exception by cmb

From: Date: Wed, 17 Jun 2015 22:16:40 +0000
Subject: note 117490 rejected from class.mysqli-sql-exception by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-202891@lists.php.net to get a copy of this message
Note Submitter: arj dot 123 at hotmail dot es ---- 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.

« previous php.notes (#202891) next »