05.06.2012, 23:08
Hi there,
So I have this little problem, when script do some query, with INSERT sql statement mysql_insert_id() returns 0;
I don't see any mistake here, if there is please help...
Thanks in advance.
So I have this little problem, when script do some query, with INSERT sql statement mysql_insert_id() returns 0;
pawn Код:
format(motd, sizeof(motd), "INSERT INTO `cocars` (`vModel`, `vUsage`, `vRespawnDelay`, `vOwner`, `vSpawned`) VALUES ('%d', '%d', '-1', '%s', '1')",
GetPVarInt(playerid, "SelectedForBuy")+400,
CAR_USAGE_PRIVATE,
playername);
mysql_query(motd, INSERT_VEHICLE_QUERY);
printf("MySQL Report: mysql_insert_id is %d.", mysql_insert_id());
Thanks in advance.