What is the mySQL equivalent to this PHP statement?
gmstrftime ("%W", time()-18000)
I figured it out. Use the DATE_SUB function.
WEEK(DATE_SUB(CURDATE(), INTERVAL 1 DAY))