wjzhangq / php_pdo Goto Github PK
View Code? Open in Web Editor NEW对php pdo 的扩展
对php pdo 的扩展
常规 1. 与php pdo 一样的初始化。例如$db = new db('mysql:host=localhost;dbname=crm;charset=utf8', 'root', 'root'); 2. 增加getOne, getRow, getCol, getAll 四个直接通过sql获取数据的方法 3. 修改query()函数, 支持 $db->query('select :name from table', array('name'=>'id')) 这种写法。 4. $db['table']->insert(array('kk'=>'fff')); //将数据插入到table表,并返回插入id 魔法 1. count($db) 获取当前数据库中有多少表 2. $db['table']; //获取tableb表对象 3. $db['table'][] = array('kk'=>'fff'); //将array()数据插入到table表 4. $db['table'][1] = array('kk'=>'fff'); //更新主键为1的数据 5. unset($db['table][1]); //删除主键为1的数据 6. $db['table'][array('id'=>1)]; //返回id等于1的数据 9. $db['table'][array('id:>'=>1)]; //返回id大于1的数据, 支持>, <, >=, <=, = 10. $db['table'][array('id'=>array(1, 3, 5))]; //返回id等于1, 3, 5的数据 11. $db['table']->order('id DESC')->limit(0, 1)->query(array('id:>'=>1)); 12. count($db['table']->where(array('id:>'=>1))); //id 大于1的数据数量 13. $db['table'][1] = array('kk:+'=>2); //更新主键为1的数据z字段kk自己增加2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.