Page 1 of 1

Auto update a table based on input range...

Posted: Wed Mar 17, 2010 4:34 am
by RitchieTheBrit
Hey guys!

Hacked around with PHP quite a lot in the past, but never really got my teeth into it, until now.

I am building a database driven website, and I need to store a large range of values into a table. The range will be dictated by form input from user fields, eg....

Start Year = 1955
End Year = 2009

...and I need the PHP to fill in the gaps. I have the key set to autoincrement. Ideally, I would like the PHP to wipe the table, reset the autoincrement and then fill in the blanks.

Is this possible? If so, can anyone provied any pointers for me? I couldn't find any information on user ranges.

Many thanks!

Re: Auto update a table based on input range...

Posted: Wed Mar 17, 2010 5:41 am
by requinix
What do you need this for?

Re: Auto update a table based on input range...

Posted: Wed Mar 17, 2010 7:15 am
by RitchieTheBrit
Hey there, tasairis!

Its to fill out a MySQL table of years that will be used as a dynamic dropdown list, so years can be attributed to items. It needs to be adjustable though, as I have no idea what the range has to be yet, and it can change at any time.