<?php //Create $mysql['192.168.1.10'] = new MySQL('localhost', 'root', '0000', 'mysql'); $mysql['192.168.1.10']->table('test'); $mysql['192.168.1.10']->a = 1; $mysql['192.168.1.10']->b = 'peter'; $mysql['192.168.1.10']->c = 2; $mysql['192.168.1.10']->d = 'joe'; $mysql['192.168.1.10']->insert();
//Read $mysql['192.168.1.10']->table('test'); $mysql['192.168.1.10']->b = 'peter'; $mysql['192.168.1.10']->d = 'joe'; $mysql['192.168.1.10']->find();
//Update $mysql['192.168.1.10']->table('test'); $mysql['192.168.1.10']->c = 2; $mysql['192.168.1.10']->d = 'brian'; $mysql['192.168.1.10']->modify(array('a' => 1, 'b' => 'peter'));
//Delete $mysql['192.168.1.10']->table('test'); $mysql['192.168.1.10']->a = 1; $mysql['192.168.1.10']->b = 'peter'; $mysql['192.168.1.10']->delete();
//Use SQL $mysql['192.168.1.10']->bind_param('INSERT INTO test (a, b, c, d) VALUES (?, ?, ?, ?)', array(1, 'peter', 2, 'joe')); $mysql['192.168.1.10']->query(); ?>
|