[_] A question of elegance
s'unya
sunya.dickman at gmail.com
Thu Mar 8 16:51:05 GMT 2007
Hi,
I have a very inelegant situation that I'd like to make more elegant... I
have created a solution that is not exactly elegant, but works... but it is
making me cringe. Can anyone think of a better sollution.
THE SITUATION:
1) My client stores all their data in Excel spreadsheets, sometimes very
large ones.
2) I need to integrate the data into his new website (asp and mysql)
3) He updates his data quite often and would like to update the website with
it.
MY (not great) SOLUTION:
1) Create a csv from the data in the database and output it for an
administrator so that they can simply copy and paste a csv as their means of
update.
2) When changes are saved, data in the database table is Deleted and new csv
file is parsed into separate values and insert all into the database. I
toyed with UPDATE-ng the table until I ran out of records and then
INSERT-ing extra records, but that seemed to be adding a heck of a lot of
processing, so I am just DELETE-ing and INSERT-ing all data. As you can see
a little cringe-worthy
SO:
What do you think I would be better off doing?
--
o
o o
O O O
o 0 O s´unya O 0 o
www.the-resort.com