"Error ID: 1064, Error: 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 'Virtual='0' WHERE ID=2' at line 1"
"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"
Daca citesti putin, iti dai seama singur.
Poftim:
stock saveCar(idd)
{
if(idd == 0) return 1;
new query[256];
mysql_format(SQL, query, sizeof(query), "UPDATE `cars` SET `Model` = '%d', `Locationx` = '%f', `Locationy` = '%f', `Locationz` = '%f', `Angle` = '%f', `ColorOne` = '%d', `ColorTwo` = '%d', `Owner` = '%s', `Value` = '%d', `License` = '%s', `Userid` = '%d', `Virtual` = '%d' WHERE `ID` = '%d'",
CarInfo[idd][cModel], CarInfo[idd][cLocationx], CarInfo[idd][cLocationy], CarInfo[idd][cLocationz], CarInfo[idd][cAngle], CarInfo[idd][cColorOne], CarInfo[idd][cColorTwo], CarInfo[idd][cOwner], CarInfo[idd][cValue],
CarInfo[idd][cLicense], CarInfo[idd][Userid],CarInfo[idd][cVirtual],idd);
mysql_tquery(SQL, query, "", "");
return 1;
}