dee19802000 Posted December 23, 2009 Share Posted December 23, 2009 hey how would i go about deleting a row depending on a date that i have set in another row. So if i set a particular date in my date row, i want it to delete that row after this date expires? Any ideas on how i can do this? Dee Quote Link to comment https://forums.phpfreaks.com/topic/186170-delete-row-where-row-date-my-set-date/ Share on other sites More sharing options...
Adam Posted December 23, 2009 Share Posted December 23, 2009 Do you mean delete the row depending upon a date stored within another field? Quote Link to comment https://forums.phpfreaks.com/topic/186170-delete-row-where-row-date-my-set-date/#findComment-983187 Share on other sites More sharing options...
Buddski Posted December 23, 2009 Share Posted December 23, 2009 Im assuming that you mean fields? like field_name, field_expires? If thats the case, Im not 100% sure but DELETE FROM `table` WHERE NOW() >= `field_expires` and FYI this should be in the MySQL forum Quote Link to comment https://forums.phpfreaks.com/topic/186170-delete-row-where-row-date-my-set-date/#findComment-983190 Share on other sites More sharing options...
dee19802000 Posted December 23, 2009 Author Share Posted December 23, 2009 yeah, sorry! I will give it a go Quote Link to comment https://forums.phpfreaks.com/topic/186170-delete-row-where-row-date-my-set-date/#findComment-983192 Share on other sites More sharing options...
dee19802000 Posted December 23, 2009 Author Share Posted December 23, 2009 thanks, works a treat! Dee Quote Link to comment https://forums.phpfreaks.com/topic/186170-delete-row-where-row-date-my-set-date/#findComment-983202 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.