Hi,
I have hit a slight problem - I have an update statement as follows:
$conn->Execute("UPDATE units SET $res = $newrescost WHERE ID = $x");
The problem is that it comes up with an error about the syntax - I am sure I have everything covered that I need to though. The statement works but I have a text box which appears for each resource for the unit which I want to edit - it only shows the first one, then if you click it and hit enter it shows the first 2, then the first 3, then all 4 (there are only 4 resources in this game at the moment). Can anyone see what the problem could be, given that $conn is the connection to the database, $res is the resource name taken from the resources table, $newrescost is the new cost (written into the textbox) and $x is the ID of the unit to be edited?
Thanks,
Clarkey Boy