Hello, Clear - coding has 16 characters - you have defined usrpassword in the second DB for 15 - probably one character is missing with coding.
I am rather sure it is the problem, if not - sorry to disturb you.... Regards, Petr. -----Original Message----- From: Matthew Tedder [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 03, 2002 8:43 AM To: PHP Mailing List Subject: [PHP-DB] MySQL Password Writes but Doesn't Read!@#%^ Can someone please explain this to me?! It's a real puzzle.. Using the "password('abc')" command in a MySQL insert statement works for me but using it again in a select statement does not. Well--it does in one MySQL database I have but doesn't in another one. I've done exactly the same thing in each... This one works (the next one does not): ================================================= mysql> use medburg Database changed mysql> explain Users; +----------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+----------+------+-----+---------+-------+ | username | char(16) | | PRI | | | | password | char(16) | YES | | NULL | | +----------+----------+------+-----+---------+-------+ 2 rows in set (0.00 sec) mysql> insert into Users (username,password) values mysql> ('joe',password('joe1')); Query OK, 1 row affected (0.04 sec) mysql> select * from Users where password = password('joe1'); +----------+------------------+ | username | password | +----------+------------------+ | joe | 2ca5307d5156d8ce | +----------+------------------+ 1 row in set (0.00 sec) mysql> This example does NOT appear to Work: ================================================= mysql> use OpenSIG Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> explain Users; +-------------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+----------+------+-----+---------+-------+ | usrlogin | char(15) | | PRI | | | | usrpassword | char(15) | | | | | | usrsurname | char(15) | YES | | NULL | | | usrforname | char(15) | YES | | NULL | | | usremail | char(64) | YES | | NULL | | +-------------+----------+------+-----+---------+-------+ 5 rows in set (0.00 sec) mysql> insert into Users (usrlogin,usrpassword) values ('joe',password('joe1'));Query OK, 1 row affected (0.00 sec) mysql> select * from Users where usrpassword = password('joe1'); Empty set (0.00 sec) mysql> So what on earth went wrong?? What was the difference besides field names? I am totally lost here... Help... --Matthew -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]