Originally Posted by [03]Garsino
Hi, I have this querry:
pawn Код:
CMDSString = ""; strcat(CMDSString, "INSERT INTO `playerinfo` (`UserID`, `User`, `Password`, `RegisterDate`, `LastVisit`, `Level`, `Banned`, `Score`, `Money`, `WantedLevel`, `DrunkLevel`, `FightStyle`, `Skin`, `Kills`, `Deaths`, "); strcat(CMDSString, "`RegisteredIP`, `LastIP`, `Donator`, `ReactionTestsWon`, `Settings_SaveSkin`, `PlayingTime`, `MinutesConnected`, `HoursConnected`, `DaysConnected`, `RegularPlayer`, `NoPM`, `Settings_PreferedColour`, `Settings_WatchPMs`, "); strcat(CMDSString, "`Settings_WatchCMDs`, `Settings_WatchPlayerInfo`, `FavouriteVehicle`, `RejoinDM`, `Settings_GodSkin`, `Settings_JoinMessage`) VALUES "); format(CMDSString2, sizeof(CMDSString2), "('%d', '%s', '%d', '%s', '%s', '0', '0', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%s', '0', '%d', '%d', '%s', 0, 0, 0, 0, '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')", uid, escapestring[0], udb_hash(escapestring[1]), RegDate, RegDate, d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], GetPlayerIpEx(playerid), GetPlayerIpEx(playerid), d[8], d[9], pTime, d[10], d[11], d[12], d[13], d[14], d[15], d[16], d[17], d[18]); strcat(CMDSString, CMDSString2); print(CMDSString); mysql_query(CMDSString);
Full querry:
Код:
[18:57:23] INSERT INTO `playerinfo` (`UserID`, `User`, `Password`, `RegisterDate`, `LastVisit`, `Level`, `Banned`, `Score`, `Money`, `WantedLevel`, `DrunkLevel`, `FightStyle`, `Skin`, `Kills`, `Deaths`, `RegisteredIP`, `LastIP`, `Donator`, `ReactionTestsWon`, `Settings_SaveSkin`, `PlayingTime`, `MinutesConnected`, `HoursConnected`, `DaysConnected`, `RegularPlayer`, `NoPM`, `Settings_PreferedColour`, `Settings_WatchPMs`, `Settings_WatchCMDs`, `Settings_WatchPlayerInfo`, `FavouriteVehicle`, `RejoinDM`, `Settings_GodSkin`, `Settings_JoinMessage`) VALUES ('12', '[03]Garsino', '259982180', '06/10/2010', '06/10/2010', '0', '0', '0', '0', '0', '0', '4', '0', '0', '', '127.0.0.1', '0', '49', '0', '', 0, 0, 0, 0, '48', '0', '0', '0', '0', '0', '-1', '0', '0')
But in my server console I get the following error:
Код:
[18:57:24] [MySQL] Error (0): Failed to exeute query. Column count doesn't match value count at row 1.
Can you see whats wrong with my code? I've been stuck with this problem for days now and I can't seem to see whats wrong with it. (It's my first time with MySQL so please don't slap me with a trout:P)
|