#Mysql PDO 操作类
[default]
database = mysql
host = 127.0.0.1
port = 3306
username = root
password =
dbname = test
[user]
database = mysql
host = 127.0.0.1
port = 3306
username = root
password =
dbname = user
可以配置多个数据库,选择数据方式:
$obj = new Db_mysql_pdo('default');
$obj = new Db_mysql_pdo('user');
$pdo = new Db_mysql_pdo();
$pdo = new Db_mysql_pdo();
$pdo->queryquery($sql, $parameters = array(), $fetchmode = PDO::FETCH_ASSOC);
由于个人比较偏爱写原生的select SQL,所以没有封装关于select的方法
$pdo = new Db_mysql_pdo();
$pdo->insert($tableName, array $data);
$pdo = new Db_mysql_pdo();
$pdo->insertBatch($tableName, array $data);
$pdo = new Db_mysql_pdo();
$pdo->lastInsertId();
$pdo = new Db_mysql_pdo();
$pdo->update($tableName, array $where, array $data, array $other=array());
$pdo = new Db_mysql_pdo();
$pdo->delete($tableName, array $where, array $other=array());
持续更新中......