查询数据生成XML并显示的例子(基于PHP MySQL)

作者:袖梨 2022-07-02

//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

------------------------------


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 "n";

echo "";

相关文章

精彩推荐