Knowledgebase

Add .flv to all media files in Database

Posted by registercheaper, 07-16-2008, 05:23 PM
I have 20000 files in my mysql database and would like to add the .flv extension to all the video files in the database. Can someone give me the right commands to do this in Mysql? I use the phpadmin to enter the commands so its pretty easy. I know the command to find and replace is UPDATE wp_posts SET post_content = REPLACE ( post_content, 'Item to replace here', 'Replacement text here'); Is there a easy command to add .flv to all the data? thanks

Posted by Tree NC, 07-16-2008, 05:58 PM
UPDATE wp_posts SET post_content = CONCAT(post_content,'.flv'); Should work.

Posted by registercheaper, 07-21-2008, 12:48 PM
Thanks that work..But can I ask you another question? Do you know what command to use if I want to add .flv only to files that contain the words http: in the data? Thanks

Posted by Tree NC, 07-21-2008, 02:21 PM



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
CSF Score (Views: 581)
Dotable (Views: 618)
Net Logistics (Views: 591)


Language:

Client Login

Email

Password

Remember Me

Search