Use Password encode

by Mohan 2012-09-22 12:59:25

Use Password encode

/*
mysql> Drop table UserAccounts;

mysql> CREATE TABLE UserAccounts
-> (
-> UserID SMALLINT NOT NULL PRIMARY KEY,
-> Password VARCHAR(20) NOT NULL
-> );
Query OK, 0 rows affected (0.11 sec)

mysql> INSERT INTO UserAccounts
-> VALUES (101, ENCODE('pw101', 'key101'));
Query OK, 1 row affected (0.03 sec)

mysql> select * from UserAccounts;
+--------+----------+
| UserID | Password |
+--------+----------+
| 101 | ?*& |
+--------+----------+
1 row in set (0.00 sec)

*/
Drop table UserAccounts;

CREATE TABLE UserAccounts
(
UserID SMALLINT NOT NULL PRIMARY KEY,
Password VARCHAR(20) NOT NULL
);


INSERT INTO UserAccounts
VALUES (101, ENCODE('pw101', 'key101'));


select * from UserAccounts;
869
like
0
dislike
0
mail
flag

You must LOGIN to add comments