src/Fimsi/DBAL/Mysqli.php
function id_update($table, $id, $query,$bind_arr = null){
    $stmt = $this->mysqli->prepare($query) or die("can't prepare query:[$query] because [".$this->mysqli->error."]");
    if(isset($bind_arr) && $bind_arr != null){
      call_user_func_array(array($stmt,'bind_param'),$this->makeValuesReferenced($bind_arr));
    }
    $stmt->execute();

    /* close statement and connection */
    $stmt->close();

    $rows = $this->query("select * from $table where id = ?",array("i",$id));
    return $rows[0];
  }
function id_update($table, $id, $query,$bind_arr = null){
    $stmt = $this->mysqli->prepare($query) or die("can't prepare query:[$query] because [".$this->mysqli->error."]");
    if(isset($bind_arr) && $bind_arr != null){
      call_user_func_array(array($stmt,'bind_param'),$this->makeValuesReferenced($bind_arr));
    }
    $stmt->execute();

    /* close statement and connection */
    $stmt->close();

    $rows = $this->query("select * from $table where id = ?",array("i",$id));
    return $rows[0];
  }
function id_update ( $ table , $ id , $ query , $ bind_arr = null ) { $ stmt = $ this -> mysqli -> prepare ( $ query ) or die ( "can't prepare query:[$query] because [" . $ this -> mysqli -> error . "]" ) ; if ( isset ( $ bind_arr ) && $ bind_arr != null ) { call_user_func_array ( array ( $ stmt , 'bind_param' ) , $ this -> makeValuesReferenced ( $ bind_arr ) ) ; } $ stmt -> execute ( ) ; /* close statement and connection */ $ stmt -> close ( ) ; $ rows = $ this -> query ( "select * from $table where id = ?" , array ( "i" , $ id ) ) ; return $ rows [ 0 ] ; }
update the row having the given id, and return back the same row.
update the row having the given id and return back the same row .