RE: [PHP] select based on time/date

2001-09-26 Thread Jason Dulberg
2001 1:59 PM > To: Jason Dulberg; [EMAIL PROTECTED] > Subject: Re: [PHP] select based on time/date > > > Timestamp only sets itself to Now() if it isn't explicitly set (or set to > NULL). So try this: > > $out = "UPDATE logged_in SET session='',

Re: [PHP] select based on time/date

2001-09-26 Thread Sheridan Saint-Michel
Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: "Jason Dulberg" <[EMAIL PROTECTED]> To: "Sheridan Saint-Michel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 12:44 PM Subject: RE: [PHP] sel

RE: [PHP] select based on time/date

2001-09-26 Thread Jason Dulberg
u again for your time. I've learned alot from this. __ Jason Dulberg Extreme MTB http://extreme.nas.net > -Original Message- > From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] > Sent: September 26, 2001 9:38 AM > To: Jason Dulberg; [EMAIL PROTECTED] &

Re: [PHP] select based on time/date

2001-09-26 Thread Sheridan Saint-Michel
f the date types. Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: "Jason Dulberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 25, 2001 6:24 PM Subject: RE

Re: [PHP] select based on time/date

2001-09-26 Thread Sheridan Saint-Michel
TECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 25, 2001 5:08 PM Subject: RE: [PHP] select based on time/date > I tried basically what you have but I got an error: > > $sql="select * from logged_in where time_in + interval 1 hour <= now()"; > $result

RE: [PHP] select based on time/date

2001-09-25 Thread Jason Dulberg
To: 'Jason Dulberg'; 'Sheridan Saint-Michel'; [EMAIL PROTECTED] > Subject: RE: [PHP] select based on time/date > > > select * from logged_in where date_add(time_in,interval 1 hour) <= now() > > -jack > > -Original Message- > From: Jason Du

RE: [PHP] select based on time/date

2001-09-25 Thread Jack Dempsey
select * from logged_in where date_add(time_in,interval 1 hour) <= now() -jack -Original Message- From: Jason Dulberg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 6:08 PM To: Sheridan Saint-Michel; [EMAIL PROTECTED] Subject: RE: [PHP] select based on time/date I tr

RE: [PHP] select based on time/date

2001-09-25 Thread Jason Dulberg
> > select * from sessions where $timein + interval 1 hour <= now(); - Original Message - From: "Jason Dulberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 25, 2001 2:35 PM Subject: RE: [PHP] select based on time/date

Re: [PHP] select based on time/date

2001-09-25 Thread Sheridan Saint-Michel
- Original Message - From: "Jason Dulberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 25, 2001 2:35 PM Subject: RE: [PHP] select based on time/date > I had a look at the DATE_FORMAT info on the mysql doc

RE: [PHP] select based on time/date

2001-09-25 Thread Jason Dulberg
I had a look at the DATE_FORMAT info on the mysql doc page and its a bit easier to understand than the CONCATS. Would I want to use the CURTIME() function since I would want to select sessions based on the hour? How would I go about combining CURTIME with the rest of my query? Theoretically, her

Re: [PHP] select based on time/date

2001-09-24 Thread David Robley
On Tue, 25 Sep 2001 13:38, Maxim Maletsky \(PHPBeginner.com\) wrote: > Don't do it with PHP. Instead use the native functions of mySQL itself. > > Use the combination of CONCAT(), some string and date functions of > mySQL. > Something like CONCAT(SUBSTRING(), SUBSTRING(), ...) so you end up in > t

RE: [PHP] select based on time/date

2001-09-24 Thread Maxim Maletsky \(PHPBeginner.com\)
Don't do it with PHP. Instead use the native functions of mySQL itself. Use the combination of CONCAT(), some string and date functions of mySQL. Something like CONCAT(SUBSTRING(), SUBSTRING(), ...) so you end up in the right time format i.e.: -00-00. With that string you should be able to do