/    Sign up×
Community /Pin to ProfileBookmark

I want to select data from my databse where date + 7 has to be shown

Hello,

I want to select data from my databse where date + 7 has to be shown, if date + 7 days is passed current day(real world) it should not show..

This is my code for now but I’m not sure it does what I need.

sqlQuery = “SELECT * FROM placed_orders WHERE delivery_date BETWEEN DATE_SUB(CURDATE(),INTERVAL 7 DAY) AND CURDATE() OR delivery_date=’1989-01-01′ GROUP BY ob_no ORDER BY order_date DESC”

Thanks in advance !

to post a comment

2 Comments(s)

Copy linkTweet thisAlerts:
@rootJun 19.2018 — {"locked":true}
Copy linkTweet thisAlerts:
@rootJun 19.2018 — DO NOT DOUBLE POST, It does not help you one bit at getting an answer faster, quite the opposite.
×

Success!

Help @triconix555 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...