Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007

    Unanswered: mysql date operation problem??

    I am trying to display all the news which are up to todays date. I have used following query but didnt get the success

    PHP Code:
    $sql "SELECT * FROM news WHERE news_date < = todays_date"
    May be i have not enough knowledge about date operation in mysql. What i want is just your help .
    Thanks a lot.

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    dunno where you coulda got "todays_date" from

    try CURRENT_DATE which is the standard sql function (and also works in mysql) | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts