public function update($key, $value, $condition = null, $table = null) { $table = $table ?: $this->tableName; return $this->query("UPDATE {$table} SET `{$key}`='{$value}'" . $this->where($condition)); }