need help with mysql
#1

I made car system in mysql, its loading and saving on server but its not saving, just start to save and stop :/ help plz
PHP код:
forward SaveCarIntoMysql(i);
public 
SaveCarIntoMysql(i)
{
    print(
"Called SaveCarIntoMysql");
    new 
sql[500];
    
printf("Checking car id:=%d with model=%d",i,Cars[i][cModel]);
    if(
Cars[i][cModel] != 0)
    {
        
printf("checked car id=%d",i);
        
format(sql,1000,"UPDATE `vehicles` SET Description = '%s', Owner = '%s', Pos = '%s', X = '%s', Y = '%s', Z = '%s', Angle = '%s', cX = '%s', cY = '%s', cZ = '%s', cAngle = '%s', Owned = '%s', Price = '%s',\
        Locked = '%s', cLocked = '%s', Model = '%s', Col1 = '%s', Col2 = '%s', Fuel = '%s', Plate = '%s' WHERE CID = %d"
,Cars[i][cDescription],Cars[i][cOwner],Cars[i][cPos],strfloat(Cars[i][cX]),strfloat(Cars[i][cY]),
        
strfloat(Cars[i][cZ]),strfloat(Cars[i][cAngle]),strfloat(Cars[i][cTempX]),strfloat(Cars[i][cTempY]),strfloat(Cars[i][cTempZ]),strfloat(Cars[i][cTempAngle]),intstr(Cars[i][cOwned]),intstr(Cars[i][cPrice]),
        
intstr(Cars[i][cLocked]),intstr(Cars[i][ccLocked]),intstr(Cars[i][cModel]),intstr(Cars[i][cCol1]),intstr(Cars[i][cCol2]),intstr(Cars[i][cFuel]),Cars[i][cPlate],i);
        
mysql_query(sql,THREAD_ignoreCallback,imysqlCon);
        
printf("model = %d",Cars[i][cModel]);
      }
      print(
"finished");
    return 
1;

server log
Код:
[19:29:10] UnLoadCars Called
[19:29:10] saving car id:1
[19:29:10] Called SaveCarIntoMysql
[19:29:10] Checking car id:=1 with model=497
[19:29:10] checked car id=1
[19:29:22] 
----------------------------------
[19:29:22] ******* RGP
[19:29:22] ----------------------------------

[19:29:22] Number of vehicle models: 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)