reply to private message
Hello Ramie,
Thanks veruy much for that. What I am trying to do is import a pipe delimited file into MYSQL as an automatic procudure in the early hours of each day.
The actual syntax that you have supplied I assume I should be able to embed into a php script and run that against the database ?
The text file would have 20 fields in it.
I assume what I could do in the php script is empty the table to start with then run the sql statement from within the php script ?
Thanks again
Yes you just add it into a script and yes you can empty the table first if you want a complete replacement otherwise the example will add into the table replacing duplicate keys when they exist.
the important thing is that is the update is unattended that the data is totally valid or else you could find a problem waiting for you when you check it that morning.
PS. The example is not showing up correctly with PHP highhtlighting the rn part should have slashes before the r and the n