Kylie
Kylie

Reputation: 11749

Why does this query not work?

 SELECT * FROM leads WHERE researcher_id=66 AND WHERE YEARWEEK(entry_date)=YEARWEEK(now())

Can YEARWEEK not be combined with a regular ID query?? Is there some other brackets or re-arranging I need for this?

Basically I want to return all the leads generated by a researcher for the current week.

Upvotes: 0

Views: 42

Answers (1)

sunysen
sunysen

Reputation: 2351

--modify researcher_id=66 AND WHERE researcher_id=66 AND  
SELECT * FROM leads WHERE researcher_id=66 AND  YEARWEEK(entry_date)=YEARWEEK(now())

Upvotes: 4

Related Questions