Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deleting rows where date <= today

Status
Not open for further replies.

richardhowell

Instructor
Oct 31, 2002
75
GB
My hosting service is running a version of MySQL prior to implementation of subqueries. This makes it more difficult for me to do a query which will delete rows from a table where dt_start <= today's date, as I can't select CURRDATE() in the subquery. What's the 2nd best way of doing this?
 
delete from table where date <= curdate()


What is the need for subqueries?


Bye

Qatqat

Life is what happens when you are making other plans.
 
Damn! I had tried that initially and it was giving me an error. But being new to MySQL I hadn't noticed CURDATE has only one 'R'
Thanks - (with blushes)
 
Cool, not a problem.


Bye

Qatqat

Life is what happens when you are making other plans.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top