nadz Posted August 9, 2007 Share Posted August 9, 2007 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 Quote Link to comment Share on other sites More sharing options...
trq Posted August 9, 2007 Share Posted August 9, 2007 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. Quote Link to comment Share on other sites More sharing options...
nadz Posted August 9, 2007 Author Share Posted August 9, 2007 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? Quote Link to comment Share on other sites More sharing options...
trq Posted August 9, 2007 Share Posted August 9, 2007 UPDATE tbl SET uName='new123' WHERE uName = 'user123'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.