RE: [PHP] Incrementing dates

2001-04-22 Thread Warren Vail
differences. There are lots of other datetime functions in the manual ;) Warren Vail -Original Message- From: PHPBeginner.com [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 22, 2001 3:09 AM To: Martin Skjoldebrand; [EMAIL PROTECTED] Subject: RE: [PHP] Incrementing dates you can then do this

Re: [PHP] Incrementing dates

2001-04-22 Thread Martin Skjöldebrand
James, Yz wrote: >If anyone has any comments on this, I'd like to > hear > them (there's probably a simpler way around what I have done). Here's the > URL: > > http://www.yorkshire-zone.co.uk/date_increment.php > > And here's the code that powers it: > > > > > > $date = date("2001-04-28"

RE: [PHP] Incrementing dates

2001-04-22 Thread PHPBeginner.com
2001 8:13 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Incrementing dates PHPBeginner.com wrote: > > INSERT INTO table SELECT date+INTERVAL 10 DAYS AS date FROM table WHERE > bla=bla; > > it is just a way to do it. you will definitely have to play with it. > > However you can

RE: [PHP] Incrementing dates

2001-04-22 Thread PHPBeginner.com
. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 22, 2001 5:59 PM To: [EMAIL PROTECTED] Subject: RE: [PHP

RE: [PHP] Incrementing dates

2001-04-22 Thread Martin Skjöldebrand
PHPBeginner.com wrote: > I am not sure on how your possibilities are, > but doing this in PHP means literally "adding useless lines and loops" > > If possible, do it with SQL queries. Read the documentations on date > datatypes, this is so much easier... almost magic. > AND > You can (mySQL,

RE: [PHP] Incrementing dates

2001-04-22 Thread Martin Skjöldebrand
PHPBeginner.com wrote: > > INSERT INTO table SELECT date+INTERVAL 10 DAYS AS date FROM table WHERE > bla=bla; > > it is just a way to do it. you will definitely have to play with it. > > However you can easily make two queries to read the previous date > combining it with INTERVAL and then do

RE: [PHP] Incrementing dates

2001-04-22 Thread PHPBeginner.com
Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 22, 2001 4:15 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Incrementing dates James, Yz wrote: >If a

RE: [PHP] Incrementing dates

2001-04-22 Thread PHPBeginner.com
You can (mySQL, right?) do the following: UPDATE table SET date=(date+INTERVAL 10 DAYS); so if date there was 04-28, it will be added 10 more days and so will become 05-08 Use SQL for this things, it treats dates as 'dates' while PHP treats them as integers and strings. Sincerely, Maxim M

Re: [PHP] Incrementing dates

2001-04-21 Thread James, Yz
Hiya Martin. You'd probably be better working around a database solution to your needs, but I am a bit drunk (and probably can't sensibly attempt to answer your question properly), but it got me thinking, so I decided to have a play with date incrementations. If anyone has any comments on this,