PDA

View Full Version : MySQL Combine Fields


Silmaril8n
02-01-2005, 02:24 PM
Whats the best way to combine fields in MySQL. I'm not talking about a SELECT statement persay. What I have it several fields that all have INT's and I need to consolidate them into a single field permanently.

Viper007Bond
02-01-2005, 04:24 PM
Like sum them up, string them together?

Regardless, best way would probably be to write a looping PHP script that'll batch process.

Silmaril8n
02-01-2005, 11:51 PM
I did consider doing that but then I figured out that I could download a CSV dump of the database, manipulate them in Excel, then upload it back through PhpMyAdmin. Worked great!

Viper007Bond
02-02-2005, 02:33 AM
Ah, excellent. :)

Oh, and a helpful link on this topic: http://www.phpfreaks.com/tutorials/114/0.php