Use this query:

SELECT * FROM table WHERE MOTNH(DateColumn)=MONTH(now()) and 
DAYOFMONTH(DateColumn)=DAYOFMONTH(now())

Good luck,
Silviu
  ----- Original Message ----- 
  From: Jer 
  To: [email protected] 
  Sent: Tuesday, July 26, 2005 8:59 PM
  Subject: [php_mysql] Current month date in SELECT


  I've got a date column. And I want to compare the date column to the
  current date and month...so that when the query runs, the rows with
  the same date and month as the current day are returned.

  How do I do this?




  The php_mysql group is dedicated to learn more about the PHP/MySQL web 
database possibilities through group learning. 



------------------------------------------------------------------------------
  YAHOO! GROUPS LINKS 

    a..  Visit your group "php_mysql" on the web.
      
    b..  To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]
      
    c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


------------------------------------------------------------------------------




------------------------------------------------------------------------------



  -- 
  This message was scanned for spam and viruses by BitDefender.
  For more information please visit http://linux.bitdefender.com/


[Non-text portions of this message have been removed]



The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to