Skip to content

General improvements

Compare
Choose a tag to compare
@virgiliopontes virgiliopontes released this 24 Jun 03:27
· 6 commits to master since this release

Update Methods

  • Allow Insert NULL values and NOW() function;
$values = array(
    'nome'=>'Virgilio',
    'email'=>NULL,
    'status'=>1,
    'create_at'=>'NOW()'
);
$this->MySQLWizard->insert($values);
  • Select all rows of table
$this->MySQLWizard->select();
  • Allow select NULL values and with more one filter;
$filters = array(
    'nome'=>'Virgilio',
    'status'=>1
);
$this->MySQLWizard->select($filters);
  • Adjusted Insert_Batch();
$values = array(
   array(
       'nome'=>'Virgilio',
       'email'=>NULL,
       'status'=>1,
       'create_at'=>'NOW()'
   ),
   array(
       'nome'=>'Virgilio2',
       'email'=>NULL,
       'status'=>0,
       'create_at'=>'NOW()'
   ),
);
$this->MySQLWizard->insert_batch($values);
  • Adjusted for allow alter charset of connection on MySQL DB;
$database_sets = (object)array(
				'host'=>'127.0.0.1',
				'user'=>'root',
				'password'=>'',
                                'database'=>'teste',
                                'charset'=>'utf8',
                                'country'=>'Brazil'
			    );
$mysql = new MySQLWizard\MySQLWizard($database_sets);