hey there everyone. i’m writing a calendar script. what this calendar script will do is access the “calendar” database and do a search for all items with a datetime somewhere between now and 30 days from now. what kind of syntax would i use for this?
here’s what i’ve got so far:
[php]
$querystring = “SELECT name, datetime, description, contactname, contactphoneno, contactemail FROM calendar”;
[/php]
yup, don’t have anything else besides that. so here are my problems:
- how do i use mysql to determine the datetimes for now and 30 days from now?
- what kind of query would i write to select all items with datetimes between now and that datetime which is 30 days away?
oh, and i might mention this. i’m using a datetime whose length is 14 characters. so, in other words… the date format is going to be an integer like this: “20040727034415” (the time at which i’m writing this )
thanks for any help you can provide!