Exemplo n.º 1
0
 /**
  * Delegate to Statement::insert()
  *
  * @param $str_sql
  * @param $arr_params
  * @return integer Insert ID or TRUE/FALSE if no ID was generated, based on the rows affected being > 0
  * @see update()
  */
 public function insert($str_sql, $arr_params)
 {
     $obj_stmt = new DB\Statement($this->obj_db, $str_sql);
     $obj_stmt->insert($arr_params);
     $int_id = $obj_stmt->getInsertId();
     if ($int_id > 0) {
         return $int_id;
     }
     return $obj_stmt->getAffectedRows() > 0;
 }