Solved

Need Mysl query for find and replace a field

Posted on 2013-11-16
2
385 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
Comment Utility
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
Comment Utility
That did it!

Thanks!

Rowby
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Creating and Managing Databases with phpMyAdmin in cPanel.
The viewer will learn how to dynamically set the form action using jQuery.
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…

772 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

16 Experts available now in Live!

Get 1:1 Help Now