OZONE Asylum
FAQ
How do I do a search and replace on entries in my MySQL database?
This page's ID:
5747
Search
QuickChanges
Forums
FAQ
Archives
Register
You are editing "How do I do a search and replace on entries in my MySQL database?"
Who can edit an FAQ?
Anyone registered may edit an FAQ.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
There are many tricks that can help. If you are just looking to trim an entry then you can use string functions to quickly remove part of an entry. If you are looking for something more complex (like changing the name of a company or altering links inside text) then you may need to use Pattern matching (LIKE or regular expressions) and pos. some processing before updating the specific entry. It depends on how complex your data and requirements are. (Please note: While like is reasonably fast, a regular expression match will usually slow down your server quite a bit). ---------------------------- Relevant threads: [url=http://www.ozoneasylum.com/Forum12/HTML/001468.html]MySQL HELP[/url] ---------------------------- Relevant FAQs: [internallink=5481]How do I create a keyword search in MySQL?[/internallink] ---------------------------- Relevant links: [url=http://www.mysql.com/doc/en/Pattern_matching.html]3.3.4.7 Pattern Matching[/url] - MySQL Manual on using LIKE and regular expressions. [url=http://www.mysql.com/doc/en/String_functions.html]6.3.2 String Functions[/url] - MySQL Manual on String Functions _____________________ [internallink=4626]Emperor[/internallink] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Tyberius+Prime]Tyberius Prime [/url] on Tue 08-Jul-2003)[/i][/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »