Andrew Watson Posted October 29, 2014 Share Posted October 29, 2014 (edited) H, when I imported our accounts from Joomla, I couldn't bring in the passwords. No I want to change all the passwords at once through PHPmyAdmin. But I only want to change those up to customer 53553 because after that are new customer who have correctly set their passwords. I wrote the line: UPDATE `mydatabase`.`customers` SET `passwd` = MD5(’cookie-key+password’) WHERE `customers`.`id_customer` <= 53553; But I guess my knowledge of mySQL isn't good enough because that line just returns: "0 rows affected". Anyone know the correct syntax? Edited October 29, 2014 by Andrew Watson (see edit history) Link to comment Share on other sites More sharing options...
Andrew Watson Posted October 29, 2014 Author Share Posted October 29, 2014 Boom. Turns out my code was spot on. It's just that if you accidentally run it twice, then it doesn't update the fields because they are already set with the desired string. UPDATE `mydatabase`.`customers` SET `passwd` = MD5(’cookie-key+password’) WHERE `customers`.`id_customer` <= 53553; Link to comment Share on other sites More sharing options...
Recommended Posts