This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dates

 
Julie Ferry
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to deal with dates on an on-line booking site??
If a person enters a date they wish to book, i do not know how to check these with with those already booked and stored in a database (oracle) to find out if these dates are available.
I am completely stuck with this!!
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Julie Ferry:
Does anyone know how to deal with dates on an on-line booking site??
If a person enters a date they wish to book, i do not know how to check these with with those already booked and stored in a database (oracle) to find out if these dates are available.
I am completely stuck with this!!

"select count(*) from bookings where booking_date = '01-JAN-95'" where '01-JAN-95 is in the default format for your database. If the count returned is > 0, then that date has already been booked. Also you can use the PreparedStatement :

Hope this helps,
Jamie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic