How can I generate a weekly report given an end date and a start date? How should the query be?
I try this one but it's returning an error.
"SELECT * FROM table WHERE date >= startdate AN date<='enddate GROUP BY WEEK BETWEEN startdate AND enddate"
ethan.david.376
0
Newbie Poster
Recommended Answers
Jump to PostSomething like this... I am not 100% sure, but please try running it on the phpMyAdmin or the command line and see.
The date is a table column.$beg_date = '2014-03-01'; $end_date = '2014-03-07'; "SELECT * FROM YOUR_TABLE_NAME WHERE 'date' BETWEEN $beg_date AND $end_date ";
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.