在从前的php4时代,我很喜欢使用pear的DB库,使用非常方便。但是现在pear官方站已经建议我们采用MDB2来代替它,虽然MDB2的前身可能有一些DB的影子,但是使用方法还是有一些不同,这些天一边使用,一边做些笔记。
MDB2 | DB |
queryAll | getAll |
queryRow | getRow |
queryCol | getCol |
queryOne | getOne |
autoExecute | autoExecute(需要载入extended module) |
autoPrepare | autoPrepare(需要载入extended module) |
其它方法貌似一致。