Jump to content

Updating Certain Records Within A Table With New Values


real_illusions
 Share

Recommended Posts

Hi all,I have a mysql database with some values in, some rows arent filled out as the data required for them were missing. Once we get this data, is there an easy to put this into the database without doing it one by one by hand. Need an SQL statement ideally to stick into phpmyadmin to do this.One field is an unique identifier (although its not an auto increment id thingy) each value in there is different and the field we can target to fill out the missing fields.The data is most likely going to arrive in an excel file, so is there a way to getting that data from the file thats missing from the database, and matching it up where it all belongs?Does any of that make sense?I guess its a where id# is (for example) 12, update this other field with this value, but repeated alot more times and with different id# and values for the other fields.Any would be appreciated.:)

Link to comment
Share on other sites

I usually use a script to process the spreadsheet. If you're just uploading a spreadsheet to phpMyAdmin or something you can't really tell it which query to run, it will just run through all of the records and try to insert them. If you want to run special queries you'll probably want to use a script to process it. This may be useful:http://dev.mysql.com/doc/refman/5.0/en/ins...-duplicate.html

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...