Class _mysqli{
function query($query){
$res = $this->mysqli->query($query);
$result = false;
if($res){
while($row = $res->fetch_assoc())
$result[] = $row;
return $result;
} else {
return $this->mysql->error;
}
}
function insert($query){
$this->mysqli->query($query);
return $this->mysqli->insert_id;
}
function update($query){
$this->mysqli->query($query);
return $this->mysqli->error;
}
function getnumrow($query){
$res = $this->mysqli->query($query);
return $res->num_rows;
}
}
mysqli class query design
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment