RE: [PHP-DB] date functions (generates parse error)

2003-03-05 Thread John W. Holmes
t - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: David Rice [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 12:34 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP-DB] date funct

Re: [PHP-DB] date functions (generates parse error)

2003-03-05 Thread David Rice
Sorry, I forgot to add the part at the bottom where I am calling the function = $start = date('Ymd',strtotime($weekstart));   $query = "SELECT * FROM Rota WHERE date >= $start and date <= ($start + INTERVAL 6 DAY) ORDER BY staff

Re: [PHP-DB] date functions (generates parse error)

2003-03-04 Thread 1LT John W. Holmes
> Here is the whole code of my function > > Whenever i run it, it say's there is a parse error on line 6, can't see what > is the problem > the format of $weekstart (as it is stored in the Database) is -MM-DD > > = > function tips

Re: [PHP-DB] date functions (generates parse error)

2003-03-04 Thread David Rice
Here is the whole code of my function Whenever i run it, it say's there is a parse error on line 6, can't see what is the problem the format of $weekstart (as it is stored in the Database) is -MM-DD = $start = date('Ymd',strto

Re: [PHP-DB] date functions

2003-03-04 Thread 1LT John W. Holmes
> I want to use it in this function that i am creating (it's for a resteraunt > automated tips system, to work out how much tips each staff member is > entitled to. > > > function tips($weekstart){ > /* JUST BELOW HERE IS WHER

[PHP-DB] date functions

2003-03-04 Thread David Rice
I want to use it in this function that i am creating (it's for a resteraunt automated tips system, to work out how much tips each staff member is entitled to. function tips($weekstart){ /* JUST BELOW HERE IS WHE

RE: [PHP-DB] date functions

2003-03-04 Thread Hutchins, Richard
M > To: [EMAIL PROTECTED] > Subject: [PHP-DB] date functions > > > > > I am looking for a way to take a date stored in a mysql > database... and find > out the date seven days later. > > how would i do this?! > > > cheers, dave > > > >

Re: [PHP-DB] date functions

2003-03-04 Thread 1LT John W. Holmes
> I am looking for a way to take a date stored in a mysql database... and find > out the date seven days later. > > how would i do this?! too easy... SELECT date_column + INTERVAL 7 DAY FROM your_table ... ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, vi

[PHP-DB] date functions

2003-03-04 Thread David Rice
I am looking for a way to take a date stored in a mysql database... and find out the date seven days later. how would i do this?! cheers, dave _ Chat online in real time with MSN Messenger http://messenger.msn.co.uk -- PHP Data

Re: [PHP-DB] Date functions

2002-07-01 Thread [EMAIL PROTECTED]
On Mon, 1 Jul 2002, Achilleas Maroulis wrote: > Hi. > I want to know what is the right way to make some comparisons with date variables. > I have used only the date() function to get a variable in this format=> 01-07-2002 > Is there a way to add 20 days in order to have 21-07-2002 or 2 months to

[PHP-DB] Date functions

2002-07-01 Thread Achilleas Maroulis
Hi. I want to know what is the right way to make some comparisons with date variables. I have used only the date() function to get a variable in this format=> 01-07-2002 Is there a way to add 20 days in order to have 21-07-2002 or 2 months to have 01-09-2002? Thanx in advance...

[PHP-DB] DATE FUNCTIONS

2001-02-13 Thread Lynnette Klackers
I'm having problems using SQL date functions with ODBC (unix). I've browsed endless mailing lists and manuals but things that seem to work for other people doesn't work on my setup. I can get my IF statement in php working, but really need to have the validation in the select statement. Other da