nadz Posted August 6, 2007 Share Posted August 6, 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 a 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". any help would be appreciated Quote Link to comment Share on other sites More sharing options...
nadz Posted August 6, 2007 Author Share Posted August 6, 2007 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 Quote Link to comment Share on other sites More sharing options...
fenway Posted August 10, 2007 Share Posted August 10, 2007 the username should only appear once in the entire db, store the uid instead. Quote Link to comment Share on other sites More sharing options...
teng84 Posted August 10, 2007 Share Posted August 10, 2007 i guess the tread starter problem is the normalization instead of using the id as the foreign key he use the user name whic is incorrect so maybe he want to replace the record in db tables having that user name if u use id as the foreign key it will always be one table to be updated 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.