<?php
class DB {
var $query;
var $sql;
public function __construct() {
$this->sql = new mysqli("localhost", "root", "", "database");
}
public function update($tab) {
$this->query .= "UPDATE " . $tab;
}
public function set($set) {
$this->query .= " SET " . $set;
}
public function where($where) {
$this->query .= " WHERE " . $where;
}
public function execute() {
echo $this->query;
}
}
$db = new DB();
$db->update("user");
$db->set("nome='arturo'");
$db->where("id=25");
$db->execute();
?>