Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-31-2011, 12:06 AM   PM User | #1
Duodecim
New to the CF scene

 
Join Date: Aug 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Duodecim is an unknown quantity at this point
CSV processing: rearranging 3 master rosters into 12 separate ones

I was asked to do some volunteer coding for a youth sports organization I've participated in.

Basically, there are three rosters in CSV format: a player roster, a "mother" roster, and a "father" roster. Each one has columns for first name, last name, address, various contact information, etc. The player roster includes a column for grade, and the parent rosters include columns for each of their children's names.

I'm supposed to create individual rosters for each grade. The new rosters have a similar, but slightly different and simplified series of columns. Each new roster has to include a row for every player in the grade, plus a row for each student's mother and father.

I'm guessing that the program should probably cycle through every row of the player roster, find the student's first and last name, then go through the parent rosters and find the parents that match the first and last name. It should then identify, aggregate, and rearrange all the information attached to those entries (player, mother, father) into three new rows, and append them to the appropriate new grade roster. Or maybe each grade would be isolated and done separately.

I'm just not sure how to accomplish this. I've done form processing in PHP before, but I don't know how I can use that skill in this context. I'm at a loss and I could really use some advice. Does anyone have any suggestions?
Duodecim is offline   Reply With Quote
Old 08-31-2011, 12:27 PM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,046
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
Show us a few lines from each CSV file.

Then, show a few lines of how the final CSV should look for one of the 12 grades.

And finally ...
Are the CSV files coming from an Excel sheet? And if so, why not use Excel?


.
mlseim is offline   Reply With Quote
Reply

Bookmarks

Tags
csv, php

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:47 PM.


Advertisement
Log in to turn off these ads.