Jump to content

Search and replace in full mysql database with php


nadz

Recommended Posts

im trying to add an option which allows the user to change their username. Usernames appear in my database in a number of tables under several fields. i thought rather than using UPDATE queries for each field there might be a query that allows me to update all cells in the db where for example the value is "user124".

 

i found this article but im not entirely sure how to use it in php:

 

http://vyaskn.tripod.com/sql_server_search_and_replace.htm

im using phpmyadmin if that makes it easier? any help would be appreciated

Usernames appear in my database in a number of tables under a several fields.

 

Sorry, but that wreaks of poor design right away. You shouldn't ever need to duplicate data.

 

i found this article but im not entirely sure how to use it in php:

 

The article you found is for MSSQL server, not MySql. There really is no easy way to acieve what you want.

hmmm, i didnt write the script, i know its terrible coding but the script does look and function nicely. i actually paid $300 for it and this is the only issue i have with it at the moment. Anyway, if there isnt a way to search the whole database is there any way to search at least a full table?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.