Solved

Need Mysl query for find and replace a field

Posted on 2013-11-16
2
388 Views
Last Modified: 2013-11-16
Hello

I have little experience in making modifications in mysql.  But thanks to Experts-Exchange I am able to make little changes, via phpmyadmin.

I have a database named "foobar" and one of the tables in it is named "foobar_menu",  And in that table is a field named "params"

I would like the query to search the params field for (include all the quotes) :

"show_page_heading":1,"

And replace it with

"show_page_heading":0,"

That's "all" I want it to do.  An exact match and exact replace

phpMyAdmin - 2.11.11.3
MySQL client version: 5.0.95
Server version: 5.0.95-log

And, yes I have a backup of the database.

Thanks!

Rowby
0
Comment
Question by:Rowby Goren
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39654097
Running directly in PHPMyAdmin?

UPDATE foobar_menu set params=REPLACE(params,'"show_page_heading":1,"', '"show_page_heading":0,"' )

Open in new window

0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39654106
That did it!

Thanks!

Rowby
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Echo images using file system 2 30
mysql update statement effect only some rows 4 26
html input type 3 21
Method for submitting dynamically created rows 20 14
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now