i have a date field in db.
- I want all the data between Saturday Sunday and Monday .
- Of this data i want only 1 record that is record whose date is the next coming date
Hope i make my self clear
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
SELECT * FROM table WHERE DATEDIFF(CURDATE(), date)>0 AND (DAYOFWEEK(date) in (1,2,7) ORDER BY date LIMIT 0,1