masterofollies
12-18-2008, 01:04 PM
When I run this query it has no errors, it runs but nothing is actually updated. Does anything look wrong to you?
doquery("UPDATE people SET ".$trow['poof2']."=".$trow['poof2']."-".$trow['amountwo'].", ".$trow['poof']."=".$trow['poof']."+".$trow['amountone']." WHERE id='".$loginrow["id"]."' LIMIT 1",);
abduraooft
12-18-2008, 01:16 PM
When I run this query it has no errors, How do you know that?
WHERE id='".$loginrow["id"]."' LIMIT 1",); and that comma at the end is for what?
masterofollies
12-18-2008, 02:19 PM
All my other queries process that way. The limit is to have the query only update that user. So it doesn't attempt to update more.
CFMaBiSmAd
12-18-2008, 02:27 PM
The posted code generates a fatal parse error because of the comma that abduraooft mentioned and the page that code is on never executes.
lokeshshettyk
12-18-2008, 02:31 PM
The comma at the end of the statement makes no sense as abduraooft said and what's with this,
".$trow['poof']."+".$trow['amountone']."
shouldn't that be something like
".($trow['poof'] + $trow['amountone'])."
I am just guessing...
Cheers :)
lokeshshettyk
12-18-2008, 02:32 PM
my mistake, accidentally clicked submit twice - ignore this
masterofollies
12-18-2008, 04:54 PM
The comma at the end of the statement makes no sense as abduraooft said and what's with this,
".$trow['poof']."+".$trow['amountone']."
shouldn't that be something like
".($trow['poof'] + $trow['amountone'])."
I am just guessing...
Cheers :)
Well see maybe that is why it doesn't work. I've used single fields before, but have never used a query field in a query.
The comma is needed between the two update fields because it's adding to one, and subtracting from the other.