Beispiel #1
0
 function registerUser()
 {
     // 		$username=$_POST['username'];
     // 		$password=$_POST['password'];
     // 		$u=new User();
     $db = DataBase::getInstance();
     p($db->fetchObjects("Select * from users WHERE id=2"));
     //print_r($u->select('*')->where('id','=',2)->andwhere('id','=',2)->first());
 }
Beispiel #2
0
 function __construct()
 {
     $this->db = DataBase::getInstance();
     if (!isset($key)) {
         $this->key = 'id';
     }
     if (!isset($table)) {
         $cls = get_called_class();
         $tmp = explode('\\', $cls);
         $this->table = strtolower(array_pop($tmp)) . 's';
     }
 }
Beispiel #3
0
 function __construct()
 {
     $this->db = DataBase::getInstance();
 }