troubleshooting Question

How to increment through records on a weekly basis

Avatar of adrake9
adrake9 asked on
PHP
2 Comments1 Solution312 ViewsLast Modified:
I have results for a weekly time sheet that I have dynamically generated on a page. What i want to do is to be able to navigate through these records on a weekly basis. the code below is the query i use to generate the results. My question is...Is it possible to create a variable that would go forward or back in one week increments?

Is this done in the query? or do i need to set up some php variables that accomplish this and use them in the query? any help is appreciated.
-a
$week_query = ("SELECT * from timecard_data
		WHERE WEEK(CURDATE()) = WEEK(job_date) 
		AND emp_id = '$emp';");

Open in new window

ASKER CERTIFIED SOLUTION
Sebastian Talmon
System Administrator

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros