Hi there everyone,
I've been reading MySQL's datetime page, but to be completely honest, I'm not a very proficient coder and it causes me more confusion than anything else.
I have a PHP script in which I would like to create a MySQL row containing submitted classified ad data. This data should include a datetime stamp for the current time(NOW()) and then a datetime stamp for 2 weeks in advance.
I'm having problem adding two weeks to the datetime:
$query6="INSERT INTO classifieds_ads (user_id,cat_id,title,amount,body,primary_image,image_1,image_1_thumb,image_2,image_2_thumb,image_3,image_3_thumb,image_4,image_4_thumb,image_5,image_5_thumb,image_6,image_6_thumb,create_date,end_date) VALUES ('$user_id','$adcreate_cat_id','$adcreate_title','$adcreate_amount','$adcreate_body','$adcreate_primary_image','$adcreate_image_1','$adcreate_image_1_thumb','$adcreate_image_2','$adcreate_image_2_thumb','$adcreate_image_3','$adcreate_image_3_thumb','$adcreate_image_4','$adcreate_image_4_thumb','$adcreate_image_5','$adcreate_image_5_thumb','$adcreate_image_6','$adcreate_image_6_thumb',NOW(),NOW('+2 week'))";
+2 week didn't work and I'm having problems finding any tutorials on adding to the datetime at the MySQL string.
Any help would be greatly appreciated!
thanks,
json