I have a problem with a mysql query. This is the code:
session_start ();
$db = mysql_connect('localhost', 'user', 'pw') or die(mysql_error());
mysql_select_db("wordpress_97") or die(mysql_error());
$names=mysql_query('set names utf8');
$tempnewpw = md5($tempnewpw);
$query = mysql_query("UPDATE wordpress_97.tUsers SET passwort = '$tempnewpw' WHERE tUsers.UserID = '$theuserid'") or die(mysql_error());
Yes I know that I shouldn't use the mysql_ functions but it's just testing..
And this is the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE wordpress_97.tUsers SET passwort = 'pwinmd5'' at line 1
I can't get away these Â...
The database shouldn't be the problem - other querys work without problems with the same structure.
Any ideas?
Thanks in advance