万能SQL调语句,可调用数据库任意内容
以下是语句,可自行修改需要调用的条件,这个是我用来调出商城的顶级分类用的,destoon竟然不开发个SQL万能调用标签,没办法只好只自己写了。query("SELECT * FROM destoon_category WHERE moduleid=16 AND parentid=0 ORDER BY listorder,catid ASC limit 100");
$rs = mysql_fetch_array($result);//记录数据
?>
catid;?>" target="_blank">
img;?>" alt="catname;?>" height="136" width="136">
很给力!
http://bbs.destoon.com/static/image/smiley/default/victory.gif
这句是带if else 判断的,内容为空时显示提示语句
query("SELECT * FROM destoon_category WHERE moduleid=16 and letter='b' AND parentid=0 ORDER BY listorder,catid ASC");
$rs = mysql_fetch_array($result);
?>
catid;?>" target="_blank">
img;?>" alt="catname;?>" height="80" width="120">
厉害
http://bbs.destoon.com/static/image/smiley/default/victory.gif
直接sql会增加数据库的压力。
激棍啊
http://bbs.destoon.com/static/image/smiley/default/time.gif
好东西,收藏了。!!
收下了,有的时间还是会用到的
收下看看
这个写的好~~~
数据库最终崩溃,服务器被托当机
页:
[1]