数据库类自动更新方法详解
摘要:
/** *封装一个 自动 更新的方法 * @param $data array 需要更新的字段和值的关联数组 * @param $where_str string 更新条件 默认没有条件 * @return bool 更新成功为真 失败为假 */ public function autoUpdate($data, $where_str='') { //语句开始, sql语句的开始部分 $query = "update {$this->getTable()} set "; //拼凑字段了 ... 阅读全文
posted @ 2013-01-04 23:47 mtima 阅读(543) 评论(0) 推荐(0)