Do anyone see what im doing wrong with the update query?
i get this mysql_error message;
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 '-xxx WHERE id = '616' AND userid = '15'' at line 1
$query = "SELECT * FROM ue-xxx WHERE id = '$imageid' AND userid = '$userid'";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result) or die(mysql_error());
$result6 = mysql_query("UPDATE `ue-xxx` SET `albumname` ='$newalbum' WHERE `albumname` ='$oldalbum' BY `id` ='$imageid'")or die(mysql_error());
if($result6){echo "Done!";}else echo "Something went wrong...";