Jump to content

Mass Update?


guitarist809

Recommended Posts

Hello everybody.

 

I'm trying to do a "mass update" in a table of mine

 

the structures is as follows

id, name_id, location_id, comments.

 

Before, i used to have to manually enter <BR> for a newline (in the comments), but i just found about nl2br().

 

Is there a query i can do to update all the text in the comments field (for every row) to replace any <br>'s with \n's?

 

UPDATE table SET comments=REPLACE('<br>', '\n') WHERE 1

 

Thats what I'm trying to do...

 

 

Any help would be greatly appreciated,

 

Thanks,

-Matt

Link to comment
https://forums.phpfreaks.com/topic/43754-mass-update/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.