function getadvdetail($aid)
{
global $aid; //注意这里!!!!!!!!!!!!!!!!
$sql="select * from advertise where aid='$aid'";
$result=mysql_query($sql);
$res=mysql_fetch_row($result);
$this->title=$res["title"];
$this->content=$res["content"];
$this->submittime=$res["submittime"];
}
{
global $aid; //注意这里!!!!!!!!!!!!!!!!
$sql="select * from advertise where aid='$aid'";
$result=mysql_query($sql);
$res=mysql_fetch_row($result);
$this->title=$res["title"];
$this->content=$res["content"];
$this->submittime=$res["submittime"];
}
解决方案 »
- 类似微博或者帖子配图功能,该如何设计数据库
- PhP时间语句出错if(date('H')>=23 && date('H')<=5)
- 换域名的头痛事
- 不显示删除回复显示所有回复显示星级回复显示得分回复 怎样设定iis执行时间 我上传文件到网站,五分钟就断了
- 还是Call to undefined function 的问题,又耽误了两天没弄好,在线等高手指点!!
- 苹果桔子价格计算,找不到哪里错了,晕。
- 真的搞不懂了,请各位高人指点
- 急问在php代码中能实现文件保存吗(要求能弹出标准的保存对话框来选择用户希望保存的路径)?谢谢!!!
- 随缘论坛新开张,散分
- 为什么我的PHP安装找不到php_calendar.dll,php_zlib.dll,php_ldap.dll?
- PHP 4.3.4RC1 released
- 菜鸟请教:为什么会出现白页啊?
你的sql单独执行一次,看看有结果没
不用类封装