+ Post New Thread
Results 1 to 2 of 2

Thread: Query to Replace text with quotation marks in whole mysql database

  1. #1
    Administrator
    Join Date
    Mar 2013
    Posts
    2,710

    Query to Replace text with quotation marks in whole mysql database

    Hi, i would like to replace

    [quote name='varioususernamesthere']

    by

    [quote name="varioususernamesthere"]

    (single to double quotation marks)

    in whole mysql database table.

    Please what is the command to use?

    Something like? UPDATE tablename SET "%
    [quote name="varioususernamesthere"]%" WHERE "%[quote name='varioususernamesthere']%";

  2. #2
    Administrator
    Join Date
    Mar 2013
    Posts
    2,710


    Is this useful / helpfull? Yes | No
    Here is how to replace string in mysql with quotation marks single and double. This command will replace partial string '] by "] in table TableName and column name ColumnName

    update TableName set ColumnName = REPLACE(ColumnName, "']", '"]') WHERE ColumnName LIKE "%']%";

    (Make sure you backup mysql first before runing this query)

    This one may work if table is "post", in column "pagetext".:
    update post set pagetext = REPLACE(pagetext, "']", '"]') WHERE pagetext LIKE "%']%";

+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 08-05-2016, 11:56 AM
  2. Replies: 0
    Last Post: 03-02-2015, 02:01 PM
  3. Too many conditions in mysql query - is efficient?
    By Fli in forum HTML,CSS, Javascript Coding & Programming
    Replies: 0
    Last Post: 09-22-2013, 06:16 PM
  4. How to make mysql query search case insensitive?
    By Fli in forum PHP, MySQL Forum
    Replies: 0
    Last Post: 09-22-2013, 05:08 PM
  5. Replies: 0
    Last Post: 03-24-2013, 02:58 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 Protected by : ZB BLOCK  &  StopForumSpam