我试过这样的语法好象错误~~
select * from eshop_goods where ($nowdate-goods_up_date)>$daynum谁能告诉我一个正确的语法啊?

解决方案 »

  1.   

    $nowdate的值是02-09-04
    $daynum的值是50
      

  2.   

    select * from eshop_goods where to_days($nowdate)-to_days(goods_up_date)>$daynum
      

  3.   

    to:phpteam(George) 好象这条语句不好使啊~~
      

  4.   

    不太可能吧,
    SELECT * 
    FROM test
    where to_days( '2002-09-06' ) - to_days( pubdate ) > 50 
    我试了一下,好的嘛
      

  5.   

    这回好了~~:)~我的nowdate是02-09-03改成2002-09-03就行了~~呵呵~多谢~~加分!