If you put it in a temporary table you could write a single update
statement to do the update matching on customer numbers

Pat Newberry
www.gypsyfarm.com



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Malcolm Spann
Sent: Thursday, February 16, 2006 3:50 PM
To: [email protected]
Subject: [php_mysql] Export-Import question



I'm still new to PHP and MySQL, and I normally fumble around with 
a problem for quite a while before asking for help, but I'm trying to 
save some frustration this time.

I have a MySQL database of several thousand customers. I need to 
bring the names/addresses/etc. into an address verifyer and bulk- mail
sort program. This program does not support MySQL. I can 
successfully export the fields I need to a .csv file, and import that 
into the mail program. Once the mail program cleans the addresses, 
I can then export the now clean data into another .csv file.

Now, what's the best way to bring the now updated (cleaned) data 
back into the original MySQL database?

Should I import the data into a temporary table, and then step 
through it, record-by-record, and do an update on the original table, 
matching up the customer numbers?

Should I import the data into an array, and step through it from 
there?

Do I simply do a REPLACE where the new customer # matches the 
old customer #? There is still data in the original table that was not 
exported.

Comments, suggestions, books, and/or examples would be 
appreciated!

Thanks.
Malcolm






The php_mysql group is dedicated to learn more about the PHP/MySQL web
database possibilities through group learning.  
Yahoo! Groups Links



 




The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to