RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-22 Thread Jeff Armstrong
overboard. [soapbox.off] Kiora -Original Message- From: Jon Snell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 21, 2001 10:54 PM To: Thomas Edison Jr. Cc: [EMAIL PROTECTED] Subject: RE: SV: [PHP] Booking by Date/Time in mySQL Yes, I would recommend locking your tables before doing this ju

RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-21 Thread Jon Snell
statement and worry about race conditions... -Original Message- From: Jeff Armstrong [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 20, 2001 12:36 PM To: Thomas Edison Jr. Cc: [EMAIL PROTECTED] Subject: RE: SV: [PHP] Booking by Date/Time in mySQL the logic goes: $start

[PHP] Booking by Date/Time in mySQL : my CoDe!!

2001-03-20 Thread Thomas Edison Jr.
Mr. Jeff, following is the code i'm using in my page, could you tell me what i'm doing wrong, besides of course the famous "uh ohh i got a row back()" code that needs to be replaced =sdate and '$realsdate'<=edate) or ('$realedate'>=sdate and '$realedate'<=edate)",$db); if (uh_ohh_I_got_a_r

RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Thomas Edison Jr.
ike you are just > > testing > > the FIRST one. > > > > why not turn it round and do: > > select * from booking where > > ('$start'>=startdate and '$start'<=enddate) or > > ('$end'>=startdate and '$en

RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Thomas Edison Jr.
ike you are just > > testing > > the FIRST one. > > > > why not turn it round and do: > > select * from booking where > > ('$start'>=startdate and '$start'<=enddate) or > > ('$end'>=startdate and '$en

RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Jeff Armstrong
aranteed safe, as you can end up with double bookings in the pico seconds between the select and the insert - but hey, how many hits a second do you expect. Regards Jeff's Granny -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 20, 2001 5:08

RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Thomas Edison Jr.
e','$purpose','$r > es')"; > $result = mysql_query($sql) or Die ("An > unexpected > error occured. Please go back and book again."); > echo " color=#140057>Thank you! color=#ff>$rooms, has been booked from > $realsdate t

RE: SV: [PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Jeff Armstrong
AM To: Peter Chr. Hansen Cc: [EMAIL PROTECTED] Subject: Re: SV: [PHP] Booking by Date/Time in mySQL Peter, what do you mean by Newdate between date1 & date2?? the logic i'm using is that i'm checkin if the new Start Date & End date lies between the old Start Date & End Date

Re: SV: [PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Thomas Edison Jr.
AIL PROTECTED]> wrote: > Can't you use " > Newdate between date1 and date2 > > > -Oprindelig meddelelse- > Fra: Thomas Edison Jr. > [mailto:[EMAIL PROTECTED]] > Sendt: 20. marts 2001 12:25 > Til: [EMAIL PROTECTED] > Emne: [PHP] Booking by Date

[PHP] Booking by Date/Time in mySQL

2001-03-20 Thread Thomas Edison Jr.
I'm facing this problem. I have made a room booking application. There is a Start Date & Time and End Date & Time of Booking a room. Problem is that once booked, you can't book a room with a date or time that falls between an Already booked Date & Time. For example, if someone's booked a ro