![]() |
Add column to user table?
How would you add an md5 of the username as a column to the user table? And how would you keep them synced?
|
ALTER TABLE user ADD COLUMN usernamehash CHAR(32);
UPDATE TABLE user SET usernamehash = MD5(username); Although I'm not sure what purpose that could serve... |
But what about when a user registers or when a users name is changed?
|
Quote:
|
Are you sure you need this? It seems rather unnecessary.
SELECT MD5(username) FROM user WHERE userid = ___; you can have a MD5 whenever you want it, without adding a column or having to worry about syncing. |
Well I am provided an md5 of the username and I need to get the row in the user table with it.
Andrew would this be possible? SELECT * FROM user WHERE MD5(username)='hash'? |
All times are GMT. The time now is 10:11 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|