[luau] MySQL Querry Question
Vikram Khurana
vkhurana at mail.nmfs.hawaii.edu
Wed Feb 4 16:49:00 PST 2004
To make it so you don't have to run the query multiple times with different
filenames & substr lengths, you can use
update songlist set filename=concat("e:\\music\\",SUBSTRING_INDEX(filename,
'\\', -1));
OR
Because you are probably going to dump it, in order to move it --> you can
just do a file replace.
-----Original Message-----
From: luau-admin at videl.ics.hawaii.edu
[mailto:luau-admin at videl.ics.hawaii.edu] On Behalf Of Maddog
Sent: Wednesday, February 04, 2004 10:26 AM
To: luau at videl.ics.hawaii.edu
Subject: [luau] MySQL Querry Question
Any MySQL masters out there? I have a song DB on my old radio station server
which had songs in different folders spread across 3 drives.
F:\Heavy
F:\Music
G:\New Downloaded Music
and
I:\Music
I have gathered website addresses Buy CD links and album cover art for all
of those songs. I built a new server which is now running the station. All
the songs are located on one drive in E:\Music
I need to create an Update sql querry that will update the old file
locations to the new one so i can then export the data from the old DB and
import it into the new db.
Can someone help me with this? Here is what i came up with but I don't know
if this will work, guess I don't trust myself :-)
UPDATE songlist SET filename = 'E:\music\'+SUBSTR(Filename,8,200)
WHERE
substr(Filename,1,8) = 'F:\Heavy'
Then just change the original file location and run the SQL querry again?
Thanks,
Don
<http://www.heavycore.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freesoftwarehawaii.org/pipermail/luau-freesoftwarehawaii.org/attachments/20040204/f5a1384c/attachment-0001.htm>
More information about the LUAU
mailing list