NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
MySql Password function does not work through PHP


Joined: 02 Apr 2008
Posts: 2
Reply with quote
I get an error when I run the below through PHP, but it works fine when I run it in my MySql ide.

include 'config.php';
include 'opendb.php';
/* PASSWORD('newpass') */
mysql_select_db('test') or die('Error, cannot select mysql database');
$query = "UPDATE user SET password = PASSWORD('newpass') WHERE user = 'a' ";
mysql_query($query) or die('Error, query failed');
include 'closedb.php';
echo " user updated";
View user's profileFind all posts by wmsteinSend private message


Joined: 02 Apr 2008
Posts: 2
Reply with quote
I found out the issue. The size of my password field was shorter than 41 bytes.
View user's profileFind all posts by wmsteinSend private message
MySql Password function does not work through PHP
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic