Auto update a table based on input range...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RitchieTheBrit
Forum Newbie
Posts: 5
Joined: Mon Oct 12, 2009 9:19 am

Auto update a table based on input range...

Post 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!
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

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

Post by requinix »

What do you need this for?
RitchieTheBrit
Forum Newbie
Posts: 5
Joined: Mon Oct 12, 2009 9:19 am

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

Post 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.
Post Reply