aspose file tools
The moose likes JDBC and the fly likes mysql query to check the date Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "mysql query to check the date" Watch "mysql query to check the date" New topic
Author

mysql query to check the date

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi,
I am doing a program like phone booking.Now what i need is, a person who had booked a product already in last 15 days should not book another time within that 15 days.what is the mysql query to check whether he had booked already within last 15 days.

Thanks.
Dag Corell
Greenhorn

Joined: Sep 19, 2006
Posts: 3
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_datediff
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi,
Thank you for your reply.
i want to check whether the systemdate and registered date is greater than 20.if yes i want to update the flag and registered date.if not ,it should go to else part.But my code does not goes to the else part even the condition is false.where am i wrong?my code follows:

please help me to find my error.

Thanks.
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
I got the result. Thanks
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: mysql query to check the date
 
Similar Threads
Cant insert euro symbol
Exception question
exam voucher is not available(cal)
UrlyBird: Show records outside of 48 hour range
When will I receive my certificate