Solved

find and replace mysql

Posted on 2014-10-24
3
274 Views
Last Modified: 2014-10-25
In this case, I have several tables which have a clientid of 30.
I need to find every single instance and switch those over to clientid 150.

I am using phpmyadmin in this case but can also do this from the command line if needed.

mysql-server-5.5.40
0
Comment
Question by:projects
  • 2
3 Comments
 
LVL 50

Accepted Solution

by:
Steve Bink earned 500 total points
ID: 40404055
Quick and dirty..  For each of the tables you need to change:
UPDATE <tablename> SET clientid=150 WHERE clientid=30

Open in new window

0
 

Author Comment

by:projects
ID: 40404379
Thank you. I'm amazed that I wasn't able to find something this simple when searching the net.
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 40404440
You can find more information in the MySQL docs.  Good luck!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

773 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