Jump to content

[SOLVED] MySQL Update query failng


joecooper

Recommended Posts

Use quotes:

 

$query = "UPDATE users SET high='$score' WHERE username='$username'";
mysql_query($query) or die('Error, query failed');

 

Other stuff to do...

 

-check you are connected to the database

-check the table columns "high" and "username" exist

-check the variables $score and $username actually exist

 

If all else fails, show us the actual error message

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.