At Thursday 4/12/01 08:56 AM, [EMAIL PROTECTED] wrote:
> I need to take a flat file (currently in excell) and upload it into a MYSQL
> database via the web using PHP. This will happen every week so what is the
> best way to do this drop the table then re-create it with the info. from
the
> file or append the data?
Khristopher,
Sounds like either you design a means of doing weekly updates of new data
only, what you mean by 'append' I think? Or else get yourself an ever
increasing upload containing more and more old stuff that just grows and grows.
The way to make this work as an update process is to create a unique key
for every record added to the database from the excell source file. An easy
way to do this is to use the Unix time function which returns time in
seconds. Of course you'll likely need to add some program logic so as not
to get duplicate keys, but this is easy to do.
Marty
Face 2 Interface Web Solutions
Content Management Made SIMPL(tm)
http://face2interface.com/Home/SIMPL.shtml
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php