![]() |
MySql statement needed
Can someone tell me if there is a MySql statement that will do a search and replace on a database? Or any alternative maybe?
|
Quote:
UPDATE links SET niche='Amateur' WHERE niche='Amaateur'; UPDATE links SET niche='Hairy',status='Active' WHERE submitter='xxxx' AND email like 'some_dude%'; I hope this helps :D |
Quote:
|
create tablenamebackup select * from tablename;
update tablename set fieldname=replace(fieldname,'!',''); tablenamebackup = whatever you want that signifies that you made a backup tablename = the table that contains the data you want to change fieldname = the name of the field that has the data you want to change if you don't know the name of the table or how the table is laid out: show tables; describe tablename; If you're using phpmyadmin, you should be able to navigate through and get the info from the command above. note, if you screw up: delete from tablename; insert into tablename select * from tablenamebackup; |
Thanks cd34 - that did the biz |bow| I still had to call in Chop to point out that my spelling was wrong in the statement which led to me wasting his time and mine |shocking|
|
All times are GMT -4. The time now is 06:26 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc