中国站长论坛

中国站长论坛 ›› 网络编程 ›› 问个php问题

页码: 1

问个php问题

- mydipan 2008-08-18 02:23

代码 复制 - 运行
$Sql = "select * from userinfo where user='". $buf."' and password='".$p."'";


这一行代码中,我想多加入一个判断,date 小于 当前时间(2009-08-18这样的格式),该怎么写?

Re:问个php问题

- dmkf 2008-09-02 12:29

$Sql = "select * from userinfo where user='". $buf."' and password='".$p."' and `date`<'2009-08-18'";

Re:问个php问题

- xinbi 2008-09-02 15:31

上面不行的

Re:问个php问题

- xinbi 2008-09-02 15:31

mysql要用时间戳,或者转换

Re:问个php问题

- 枫叶儿 2008-09-02 15:57

帮忙顶贴

re:沙发 dmkf

- tomheng 2008-09-05 12:31

用time_to_sec()实现时间转换

Re:问个php问题

- mgspring 2008-09-05 18:21

ni chi !

Re:问个php问题

- wxj_16740 2008-09-05 22:30

楼上什么意思

页码: 1