----- Original Message -----
From: "Jianping Zhu" <[EMAIL PROTECTED]>
Sent: Tuesday, February 04, 2003 1:58 PM
> I want the passwd field not to be plain text but encrypted. how can i do
> that?
Use the password function:
mysql> create table users (
-> name varchar(12),
-> pass varchar(16));
Query OK, 0 rows affected (1.14 sec)
mysql> insert into users values ('bruce',password('mine'));
Query OK, 1 row affected (0.12 sec)
mysql> select * from users where pass = password('mine');
+-------+------------------+
| name | pass |
+-------+------------------+
| bruce | 61ce8de3029ff1ab |
+-------+------------------+
1 row in set (0.14 sec)
See also http://www.mysql.com/doc/en/Miscellaneous_functions.html for a
discussion of other encryption techniques, including MD5 and SHA1.
Best regards,
Bruce MacDonald
Minnesota Public Radio, St. Paul USA
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php