//TABLE
create table tableurl(
id int(5),
sort int(2),
click int(6),
getday date,
name char(30),
link char(40),
brief char(50),
PRIMARY KEY (id)
)
//XML FILE
------------------------------
<?php
require("db.inc.php");
if(empty($order))
{$order='hot';
}
switch($order)
{
case 'hot':
$querystring="select * from tableurl order by click desc LIMIT 20";
break;
case 'new':
$querystring="select * from tableurl order by getday desc LIMIT 20";
}
$result=mysql_query($querystring,$db);
echo "<?xml version="1.0" encoding="gb2312"?>n";
echo "<?xml-stylesheet type="text/xsl" href="sitelist.xsl"?>";
时间: 2024-10-24 22:12:34