Jump to content

[SOLVED] Really Basic Maths Question


herghost

Recommended Posts

Variables don't interpolate in single quoted strings.  You should use double quotes for your string and single quotes for your string values.

 

$query = "UPDATE users_credits SET credits = credits - 1 WHERE username = '$username'";

 

A good technique to learn is echoing your query string ($query) to see what you're actually passing.

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.