query .= $this->$method($arguments); return $this; } public function __toString() { return $this->query; } } $db = new DatabaseQuery(); echo $db->select('id', 'username', 'password')->from('users')->where('user_id = 5')->limit(1); ?>