mysql_log (ERROR) CMySQLQuery
#1

Всем доброго времени суток.

В чём может быть проблема, плагин MySQL R39-3.

В лог пишет ошибку:
PHP код:
[21:37:47] [ERRORCMySQLQuery::Execute[LoginCallback] - (error #1064) 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 ''112233\' LIMIT 1' at line 1 


PHP код:
publicsLoginCallback(playerid)
{
    new 
rowsfields;
    
cache_get_data(rowsfields);
    if(!
rows)
    {
        if(
GetPVarInt(playerid"wrongPass") == 2) return DKICK(playerid"Âû ââåëè 3 ðàçà íåâåðíûé ïàðîëü!");
        
SetPVarInt(playerid"wrongPass"GetPVarInt(playerid"wrongPass")+1);
        return 
LoginDialog(playerid);
    }
    
Block(playerid);
    
SetPlayerTime(playeridtimeserv0);
    
gPlayerLogged[playerid] = 1;
    if(
GetPVarInt(playerid,"pREgisrty") == 1PlayerInfo[playerid][MysqlpID] = cache_get_field_content_int(0"ID"dbHandle), SpawnPlayer(playerid);
    else 
format(CommandMas,100,"Âû óñïåøíî àâòîðèçîâàëèñü! Íîìåð Âàøåãî àêêàóíòà: %d.",PlayerInfo[playerid][MysqlpID]), SendClientMessage(playerid,COLOR_GREY,CommandMas), TogglePlayerSpectating(playerid0), SetPVarInt(playerid,"PlayerSpec",1);
    
PlayerInfo[playerid][pTut] = cache_get_field_content_int(0"pTut"dbHandle);
    
cache_get_field_content(0"pKey"PlayerInfo[playerid][pKey], dbHandle30);
    
cache_get_field_content(0,"pEmail",PlayerInfo[playerid][pEmail], dbHandle40);
    
PlayerInfo[playerid][pLevel] = cache_get_field_content_int(0"pLevel"dbHandle);
    
PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0"pAdmin"dbHandle);
    
PlayerInfo[playerid][pFuelcar] = cache_get_field_content_float(0"pFuelcar"dbHandle);
    
PlayerInfo[playerid][pHeadValue] = cache_get_field_content_int(0"pHeadValue"dbHandle);
    
PlayerInfo[playerid][pContract] = cache_get_field_content_int(0"pContract"dbHandle);
    
PlayerInfo[playerid][pCar][0] = cache_get_field_content_int(0"pCar"dbHandle);
    
PlayerInfo[playerid][pCar][1] = cache_get_field_content_int(0"pCar2"dbHandle);
    
PlayerInfo[playerid][pHelper] = cache_get_field_content_int(0"pHelper"dbHandle);
    
PlayerInfo[playerid][pDonateRank] = cache_get_field_content_int(0"pDonateRank"dbHandle);
    
PlayerInfo[playerid][pSex] = cache_get_field_content_int(0"pSex"dbHandle);
    
PlayerInfo[playerid][pMuted] = cache_get_field_content_int(0"pMuted"dbHandle);
    
PlayerInfo[playerid][pCash] = cache_get_field_content_int(0"pCash"dbHandle);
    
PlayerInfo[playerid][pDonatemoney] = cache_get_field_content_int(0"pDonatemoney2"dbHandle);
    
PlayerInfo[playerid][pExp] = cache_get_field_content_int(0"pExp"dbHandle);
    
PlayerInfo[playerid][pKills] = cache_get_field_content_int(0"pKills"dbHandle);
    
PlayerInfo[playerid][pJailed] = cache_get_field_content_int(0"pJailed"dbHandle);
    
PlayerInfo[playerid][pJailTime] = cache_get_field_content_int(0"pJailTime"dbHandle);
    
PlayerInfo[playerid][pLeader] = cache_get_field_content_int(0"pLeader"dbHandle);
    
PlayerInfo[playerid][pMember] = cache_get_field_content_int(0"pMember"dbHandle);
    
PlayerInfo[playerid][pRank] = cache_get_field_content_int(0"pRank"dbHandle);
    
PlayerInfo[playerid][pJob] = cache_get_field_content_int(0"pJob"dbHandle);
    
PlayerInfo[playerid][pChar] = cache_get_field_content_int(0"pChar"dbHandle);
    
PlayerInfo[playerid][pModel] = cache_get_field_content_int(0"pModel"dbHandle);
    
PlayerInfo[playerid][pPnumber] = cache_get_field_content_int(0"pPnumber"dbHandle);
    
PlayerInfo[playerid][pPayDayHad] = cache_get_field_content_int(0"pPayDayHad"dbHandle);
    
PlayerInfo[playerid][pWarns] = cache_get_field_content_int(0"pWarns"dbHandle);
    
PlayerInfo[playerid][punWarns] = cache_get_field_content_int(0"punWarns"dbHandle);
    
PlayerInfo[playerid][punWarnstime] = cache_get_field_content_int(0"punWarnstime"dbHandle);
    
PlayerInfo[playerid][pFuel] = cache_get_field_content_int(0"pFuel"dbHandle);
    
PlayerInfo[playerid][pMarried] = cache_get_field_content_int(0"pMarried"dbHandle);
    
PlayerInfo[playerid][pMuteTime] = cache_get_field_content_int(0"pMuteTime"dbHandle);
    
PlayerInfo[playerid][pMobile] = cache_get_field_content_int(0"pMobile"dbHandle);
    
PlayerInfo[playerid][pBank] = cache_get_field_content_int(0"pBank"dbHandle);
    
player_family playerid ] = cache_get_field_content_int(0"family"dbHandle);
    
cache_get_field_content(0,"pDostup",PlayerInfo[playerid][pDostup], dbHandle34);
    
cache_get_field_content(0,"pIpReg",PlayerInfo[playerid][pIpReg], dbHandle16);
    
PlayerInfo[playerid][pZakonp] = cache_get_field_content_int(0"pZakonp"dbHandle);
    
PlayerInfo[playerid][pProz] = cache_get_field_content_int(0"pProz"dbHandle);
    
PlayerInfo[playerid][pWanted] = cache_get_field_content_int(0"pWanted"dbHandle);
    
PlayerInfo[playerid][pRealDonate] = cache_get_field_content_int(0"pRealDonate"dbHandle);
    
PlayerInfo[playerid][pNarcoZavisimost] = cache_get_field_content_int(0"NZ"dbHandle);
    
PlayerInfo[playerid][pChas] = cache_get_field_content_int(0"pChas"dbHandle);
    
PlayerInfo[playerid][pMin] = cache_get_field_content_int(0"pMin"dbHandle);
    
PlayerInfo[playerid][pSec] = cache_get_field_content_int(0"pSec"dbHandle);
    
PlayerInfo[playerid][pReprimands] = cache_get_field_content_int(0"pReprimands"dbHandle);
    
cache_get_field_content(0,"pAdminRob",PlayerInfo[playerid][pAdminRobs], dbHandle30);
    
cache_get_field_content(0,"pLics",PlayerInfo[playerid][pLics], dbHandle16);
    
cache_get_field_content(0,"cVehcom",cVehcom[playerid][0], dbHandle74);
    
cache_get_field_content(0,"cVehcom2",cVehcom[playerid][1], dbHandle74);
    
cache_get_field_content(0,"pGunSkills",PlayerInfo[playerid][pGunSkills], dbHandle26);
    
cache_get_field_content(0,"pBandLoad",PlayerInfo[playerid][pBandLoad], dbHandle26);
    
sscanf(PlayerInfo[playerid][pAdminRobs], "p<,>a<i>[4]",PlayerInfo[playerid][pAdminRob]);
    
sscanf(PlayerInfo[playerid][pLics], "p<,>a<i>[5]",PlayerInfo[playerid][pLic]);
    
sscanf(cVehcom[playerid][0], "p<,>a<i>[14]",cVehcoms[playerid][0]);
    
sscanf(cVehcom[playerid][1], "p<,>a<i>[14]",cVehcoms[playerid][1]);
    
sscanf(PlayerInfo[playerid][pGunSkills], "p<,>a<i>[6]",PlayerInfo[playerid][pGunSKill]);
    
sscanf(PlayerInfo[playerid][pBandLoad], "p<,>a<i>[3]",PlayerInfo[playerid][pBand]);
    
ResetPlayerMoney(playerid);
    
ApplyAnimation(playerid,"BD_FIRE","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"benchpress","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"CAR","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"DANCING","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"FAT","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"GANGS","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"GHANDS","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"GRAFFITI","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"GRAVEYARD","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"MISC","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"SNM","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"VENDING","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"OTB","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0);
    
ApplyAnimation(playerid,"RIOT","null",0.0,0,0,0,0,0);
    if(
PlayerInfo[playerid][pAdmin] >= 1// Åñëè óðîâåíü àäìèíêè èãðîêà áîëüøå èëè ðîâíî 1 - ïîêàçûâàåì òåêñäðàéâ ( pAdmin - ïåðåìåííàÿ àäìèíêè )
    
{
        for(new 
i;i<10;i++) TextDrawShowForPlayer(playeridCheatText[0][i]), TextDrawShowForPlayer(playeridCheatText[1][i]);
    }
    
SetHealth(playerid75);
    if(
GetPlayerHouse(playerid) || GetPlayerArendHouse(playerid)) LoadCarPlayerId(playerid,1), LoadCarPlayerId(playerid,2);
    
GangZoneShowForPlayer(playeridArmyCOLOR_YELLOW2);
    
PEfir[playerid] = INVALID_PLAYER_ID;
    
Pefir[playerid] = INVALID_PLAYER_ID;
    if(
player_family playerid ])family_info player_family playerid ] - ] [ f_online ]++;
    new 
playersip[16], MySQL[156], yearmonthday;
    
getdate(yearmonthday);
    
GetPlayerIp(playerid,playersip,sizeof(playersip));
    
format(MySQLsizeof(MySQL), "UPDATE `Accounts` SET `pOnline` = '%i', `pGetonDate` = '%d/%d/%d', `pGetonIP` = '%s' WHERE `ID` = '%d' LIMIT 1",playerid,day,month,year,playersip,PlayerInfo[playerid][MysqlpID]);
    
mysql_function_query(dbHandleMySQLtrue"""d"playerid);
    
SetPlayerSkills(playerid);
    return 
SetSpawnInfo(playerid000.00.00.00.0000000);

Reply
#2

У вас поле ID какого типа в таблице? Явно же не INT.
Reply
#3

Quote:
Originally Posted by eakwarp
Посмотреть сообщение
У вас поле ID какого типа в таблице? Явно же не INT.
http://i.imgur.com/GPVVgWc.png
Reply
#4

Тебе мускул дословно указал что у тебя синтаксическая ошибка в запросе, даже место указал, выведи запрос в лог и посмотри что там.

PS только нубы используют для наименования полей верхний регистр.
Reply
#5

Quote:
Originally Posted by Stepashka
Посмотреть сообщение
PS только нубы используют для наименования полей верхний регистр.
Почему?
Reply
#6

Quote:
Originally Posted by OKStyle
Посмотреть сообщение
Почему?
Читабельность запросов.

SELECT ID FROM TABLE WHERE PINT=0
SELECT id FROM table WHERE pint=0
Reply
#7

Не обязательно операторы MySQL писать в верхнем регистре. Кому как удобно:
Quote:

select * from table

Но в верхнем привычней и кажется более читабельным.
Reply
#8

Quote:
Originally Posted by OKStyle
Посмотреть сообщение
Почему?
Объясню по порядку:
Почему не надо использовать верхний регистр в наименовании таблиц: потому что файлы таблиц будут иметь такое же имя, и при работе с нерегистрозависимыми операционными системами вы получите приятный бонус в виде того что таблицы user, User, USER будут завалены.
Почему не надо использовать регистр в названии столбцов: в принципи проблем с этим нет, кроме семантических, лингвистических и банальной читабельности и наглядности, пример первой привели выше.
Но есть стандартны, которых придерживаются все топовые CMS, framework и им подобные.

А вообще я об этом писал тут: MySQL (F.A.Q.)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)