Msg#: 4116783 posted 11:13 am on Apr 16, 2010 (gmt 0)
it depends how the .txt file is arranged at the moment. you should paste up an example here. you need to make it so each 'field' in the database has an entry in the text file. which means you might have to introduce some blanks, if they are missing. if all the data in the text file is already seperated out with commas, or semi-colons, or whatever, then it could be as simple as just renaming the file type extension to .csv
Msg#: 4116783 posted 10:53 am on Apr 17, 2010 (gmt 0)
if the hash lines are uniform across the whole file, then you can use preg_replace to replace every seven hashes with two commas, which will turn them into blank fields.
and i would replace every space with a comma as well, which will take care of most of the rest, but then you will have a problem with their names, because it will split up their christian/middle/surnames. you'd have to come up with a regular expression which only replaces spaces with commas if one of the characters on either side is a non A-Z character. im sure one of the brainboxes here will know how to do it.
12 chars == id from 13 -> first nonalpha preceded by a space == first/last name (could also just be space first space last space) next 43 chars == something, not sure what but its 43 chars (the trailing space is included in the field as it disappears sometimes) then the mark, either FAIL or a grade, you would have to look and see if any - or + occur then finished by a space and -999999 not sure if that changes but you could look at the file
whoever produces this file could probably give you a format