March 7, 201016 yr Can any one help me with the following, i have written a small classifieds website, all that is needed now is for a member to edit their adds, all this works fine but i need them to have an end date, i have it working fine for the insert but i can not make it work for an update, its just the end date that i can not work out thank you mysql_query("update adds set category='$category', title='$title', description='$description', `date`=now() , enddate='date_add(now(), INTERVAL $enddate WEEK)' where add_id='$id' limit 1")or die(mysql_error());
March 7, 201016 yr Author Can any one help me with the following, i have written a small classifieds website, all that is needed now is for a member to edit their adds, all this works fine but i need them to have an end date, i have it working fine for the insert but i can not make it work for an update, its just the end date that i can not work out thank you mysql_query("update adds set category='$category', title='$title', description='$description', `date`=now() , enddate='date_add(now(), INTERVAL $enddate WEEK)' where add_id='$id' limit 1")or die(mysql_error()); I have it working if any one else needs it changed a few varabels around as well mysql_query("update adds set enddate=date_add(now(), INTERVAL $runtime WEEK) where add_id='$id'")or die(mysql_error()); Thanks any way
Create an account or sign in to comment