Insert 52 weeks for each year in MySQL (PHP script)
I want in a table called **week_year** with following schema:

`Week_year = {id, week, year}`  

To insert the weeks for each year, such that, for 2001 there is week 1, week 2, week 3, … , week 52, and then start over for year 2002 up until the year 2009.

I’ve tried different PHP scripts but can’t seem to be getting it right. I’ve tried different tables, one for year and one for week and then give each week a year_id, but that didn’t seem to be effective.  

I’m hoping that someone can help me create, what I believe is a simple PHP loop(s) to generate these numbers and insert them into my MySQL database.  

Sincerely  
Mestika
Insert 52 weeks for each year in MySQL (PHP script)
===

I want in a table called **week_year** with following schema:

`Week_year = {id, week, year}`  

To insert the weeks for each year, such that, for 2001 there is week 1, week 2, week 3, … , week 52, and then start over for year 2002 up until the year 2009.

I’ve tried different PHP scripts but can’t seem to be getting it right. I’ve tried different tables, one for year and one for week and then give each week a year_id, but that didn’t seem to be effective.  

I’m hoping that someone can help me create, what I believe is a simple PHP loop(s) to generate these numbers and insert them into my MySQL database.  

Sincerely  
Mestika