static function update_one($columns = null, $values, $where, $author = NULL) { if (!$author) { $author = data_use::get_usr('userid'); if (!$author) { return false; } } if (!$columns) { $columns = self::$data_columns[content]; } // $where= $where." and ".self::$data_columns[author]."=".$author; //只能修改自己的 sql_use::update_nowtime(self::$data_table, self::$data_columns[changetime], $where); $result = sql_use::update_one(self::$data_table, $columns, $values, $where); return $result; }
static function update_w($columns = null, $value, $where, $author = null) { if (!$author) { $author = data_use::get_usr('userid'); if (!$author) { die("请登录后重试!"); } $where = $where . " and " . self::$data_columns[author] . "=" . $author; //只能修改自己的 } if (!$columns) { $columns = self::$data_columns[content]; } sql_use::update_nowtime(self::$data_table, self::$data_columns[changetime], $where); $result = sql_use::update_one(self::$data_table, $columns, $value, $where); return $result; }
function changpsw($val) { // if ($this->checkup("p")!=120) sql_use::update_one($this->table, "{$this->psw_col}", "'{$val}'", "{$this->usr_col}='{$this->usr}'"); // else // exit(); }