Jump to content

[SOLVED] Pulling and updating multiple rows through a loop


msaz87

Recommended Posts

Hey all,

 

I'm working on a project that develops schedules for a league and while I've been able to get the initial setup of the schedule working, I'm not exactly sure where to start with making a page to edit the schedule.

 

Obviously, this will involve UPDATE via SQL, but I think I've just been working on other things so long and am not experienced enough to know where to begin in pulling everything and then updating it. In another topic I was assisted in turning the data into an array and inserting it and it might give an idea of how everything is going in.

 

The database structure is as follows, along with a few sample rows...

 

schedule_id.....league_date.....league.....park_id.....week.....notes.....field.....gametime.....team.....a_or_b

------------------------------------------------------------------------------------------------------------------------

1....................2009-11-07.....23...........4..............1..........[text]....1..........3:00 PM.......55........a

2....................2009-11-07.....23...........4..............1..........[text]....1..........3:00 PM.......57........b

3....................2009-11-07.....23...........4..............1..........[text]....1..........3:00 PM.......60........a

 

So the question is, how do you approach pulling this data in a way to make it editable, and then how would you use the arrays, loops or whatever in the SQL statements to update it?

 

Hopefully this makes some sense... if I've forgotten anything vital, please let me know.

 

Thanks very much for your help!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.