0

I want work in MySQLi not PDO.

How can I use ATTR_ERRMODE and ERRMODE_WARNING?

I have error an in this line :

$sqli->setAttribute(ATTR_ERRMODE,ERRMODE_WARNING);

My connect is:

class config {
  public static $info = array("defult"=>array("host"=>"localhost","user"=>"root","pass"=>"","db"=>"testing"));
}
$inf = config::$info['defult'];
$sqli = new mysqli($inf['host'],$inf['user'],$inf['pass'],$inf['db']);

$sqli->setAttribute(ATTR_ERRMODE,ERRMODE_WARNING);
jwpfox
  • 5,124
  • 11
  • 45
  • 42
  • Are you asking how to check for errors in mysqli? Are you overthinking this? StackOverflow has acres of existing snippets that show you how write conditionals and check for errors. This may be "Too Broad". – mickmackusa Dec 19 '17 at 02:12
  • the mysqli library does not provide setAttribute function – knetsi Dec 19 '17 at 02:13

0 Answers0