static function delete_w($where, $author = null) { if (!$author) { $author = data_use::get_usr('userid'); if (!$author) { die("请登录后重试!"); } $where = $where . " and " . self::$data_columns[author] . "=" . $author; //只能修改自己的 } return sql_use::delet(self::$data_table, $where); }
static function delete($id, $ifupid = null, $where = null) { if (!$where) { $where = "1=1"; } if (1 == $ifupid) { $where_plus = " and " . self::$data_columns[upid] . "=" . $id; } else { $where_plus = " and (" . self::$data_id . "=" . $id . " or " . self::$data_columns[upid] . "=" . $id . ")"; } if ($where_plus) { $where = $where . $where_plus; } return sql_use::delet(self::$data_table, $where); }