Проблема с MySQL R39-3
#1

Всем привет. В общем обнаружил некоторые ошибки в mysql_log, версия плагины R39-3

PHP код:
[21:14:49] [ERRORCMySQLQuery::Execute[] - (error #1054) Unknown column 'Izverg_*******' in 'where clause'
[21:20:11] [ERRORCMySQLQuery::Execute[] - (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 ''NIKITA\')' at line 1
[21:20:11] [ERRORCMySQLQuery::Execute[OnPlayerLoginToServer] - (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 ''NIKITA\'' at line 1
[09:06:58] [ERRORCMySQLQuery::Execute[OnPlayerLoginToServer] - (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 ''фвп123фвп\'' at line 1
[10:41:50] [ERRORCMySQLQuery::Execute[OnPlayerLoginToServer] - (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 ''02310231-+\'' at line 1
[11:46:26] [ERRORCMySQLQuery::Execute[] - (error #1054) Unknown column 'Alino4ka_Kruto' in 'where clause'
[12:27:01] [ERRORCMySQLQuery::Execute[OnPlayerLoginToServer] - (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 ''987654321\'' at line 1
[15:18:07] [ERRORCMySQLQuery::Execute[OnPlayerLoginToServer] - (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 ''adg123adg\'' at line 1 


Код:
PHP код:
public OnPlayerLoginToServer(playeridpassword[])
{
    new 
rowsfields,maximum[128];
    
cache_get_data(rowsfields);
    if(!
rows)
    {
        new 
ShowMessage[256];
        if(
GetPVarInt(playerid"wrongPass") == 2)
        {
            
ShowPlayerDialog(playerid0000DIALOG_STYLE_MSGBOX,"{D95A41}Внимание","{D95A41} Вы были кикнуты с сервера\n Введите \"/q\", Чтобы выйти","Закрыть","");
            
PlayerPlaySound(playerid11500.00.00.0);
            
KickEx(playerid);
            return 
true;
        }
        
SetPVarInt(playerid"wrongPass"GetPVarInt(playerid"wrongPass")+1);
        
format(ShowMessagesizeof(ShowMessage), "{D95A41}Внимание! Вы ввели неверный пароль!\n          У вас осталось (%d) попытки\n После вы будете на время забанены",3-GetPVarInt(playerid"wrongPass"));
        
ShowPlayerDialog(playeriddAutorizePlayerDIALOG_STYLE_MSGBOX,"{D95A41}Ошибка!"ShowMessage"Повтор""Выйти");
        
PlayerPlaySound(playerid11500.00.00.0);
        return 
true;
    }
    
cache_get_field_content(0"pID"maximum),                PlayerInfo[playerid][pID] = strval(maximum);
    
cache_get_field_content(0"pLevel"maximum),            PlayerInfo[playerid][pLevel] = strval(maximum);
    
cache_get_field_content(0"pPhousekey"maximum),        PlayerInfo[playerid][pPhousekey] = strval(maximum);
    
cache_get_field_content(0"pPbiskey"maximum),        PlayerInfo[playerid][pPbiskey] = strval(maximum);
    
cache_get_field_content(0"pPsbiskey"maximum),        PlayerInfo[playerid][pPsbiskey] = strval(maximum);
    
cache_get_field_content(0"pAdmin"maximum),            PlayerInfo[playerid][pAdmin] = strval(maximum);
    
cache_get_field_content(0"pFuelcar"maximum),         PlayerInfo[playerid][pFuelcar] = strval(maximum);
    
cache_get_field_content(0"pCar"maximum),             PlayerInfo[playerid][pCar] = strval(maximum);
    
cache_get_field_content(0"pDonateMoney"maximum),     PlayerInfo[playerid][pDonateMoney] = strval(maximum);
    
cache_get_field_content(0"pDonateRank"maximum),     PlayerInfo[playerid][pDonateRank] = strval(maximum);
    
cache_get_field_content(0"pReg"maximum),             PlayerInfo[playerid][pReg] = strval(maximum);
    
cache_get_field_content(0"pSex"maximum),             PlayerInfo[playerid][pSex] = strval(maximum);
    
cache_get_field_content(0"pMuted"maximum),             PlayerInfo[playerid][pMuted] = strval(maximum);
    
cache_get_field_content(0"pExp"maximum),             PlayerInfo[playerid][pExp] = strval(maximum);
    
cache_get_field_content(0"pCash"maximum),             PlayerInfo[playerid][pCash] = strval(maximum);
    
cache_get_field_content(0"pJailed"maximum),         PlayerInfo[playerid][pJailed] = strval(maximum);
    
cache_get_field_content(0"pJailTime"maximum),         PlayerInfo[playerid][pJailTime] = strval(maximum);
    
cache_get_field_content(0"pMats"maximum),             PlayerInfo[playerid][pMats] = strval(maximum);
    
cache_get_field_content(0"pDrugs"maximum),             PlayerInfo[playerid][pDrugs] = strval(maximum);
    
cache_get_field_content(0"pLeader"maximum),         PlayerInfo[playerid][pLeader] = strval(maximum);
    
cache_get_field_content(0"pMember"maximum),         PlayerInfo[playerid][pMember] = strval(maximum);
    
cache_get_field_content(0"pTelefon"maximum),         PlayerInfo[playerid][pTelefon] = strval(maximum);
    
cache_get_field_content(0"pRank"maximum),             PlayerInfo[playerid][pRank] = strval(maximum);
    
cache_get_field_content(0"pJob"maximum),             PlayerInfo[playerid][pJob] = strval(maximum);
    
cache_get_field_content(0"pDataReg"maximum),        strmid(PlayerInfo[playerid][pDataReg], maximum0strlen(maximum), 64);
    
cache_get_field_content(0"pVodPrava"maximum),         PlayerInfo[playerid][pVodPrava] = strval(maximum);
    
cache_get_field_content(0"pBizLic"maximum),         PlayerInfo[playerid][pBizLic] = strval(maximum);
    
cache_get_field_content(0"pPhousekey2"maximum),     PlayerInfo[playerid][pPhousekey2] = strval(maximum);
    
cache_get_field_content(0"pFlyLic"maximum),         PlayerInfo[playerid][pFlyLic] = strval(maximum);
    
cache_get_field_content(0"pBoatLic"maximum),         PlayerInfo[playerid][pBoatLic] = strval(maximum);
    
cache_get_field_content(0"pFishLic"maximum),         PlayerInfo[playerid][pFishLic] = strval(maximum);
    
cache_get_field_content(0"pGunLic"maximum),         PlayerInfo[playerid][pGunLic] = strval(maximum);
    
cache_get_field_content(0"pSDPistol"maximum),         PlayerInfo[playerid][pSDPistol] = strval(maximum);
    
cache_get_field_content(0"pDesertEagle"maximum),     PlayerInfo[playerid][pDesertEagle] = strval(maximum);
    
cache_get_field_content(0"pShotGun"maximum),         PlayerInfo[playerid][pShotGun] = strval(maximum);
    
cache_get_field_content(0"pMP5"maximum),             PlayerInfo[playerid][pMP5] = strval(maximum);
    
cache_get_field_content(0"pAK47"maximum),             PlayerInfo[playerid][pAK47] = strval(maximum);
    
cache_get_field_content(0"pM4"maximum),             PlayerInfo[playerid][pM4] = strval(maximum);
    
cache_get_field_content(0"pChar"maximum),             PlayerInfo[playerid][pChar] = strval(maximum);
    
cache_get_field_content(0"pModel"maximum),             PlayerInfo[playerid][pModel] = strval(maximum);
    
cache_get_field_content(0"pNarcoZavisimost"maximum),    PlayerInfo[playerid][pNarcoZavisimost] = strval(maximum);
    
cache_get_field_content(0"pNarcoLomka"maximum),     PlayerInfo[playerid][pNarcoLomka] = strval(maximum);
    
cache_get_field_content(0"pPnumber"maximum),         PlayerInfo[playerid][pPnumber] = strval(maximum);
    
cache_get_field_content(0"pPayDayHad"maximum),         PlayerInfo[playerid][pPayDayHad] = strval(maximum);
    
cache_get_field_content(0"pWarns"maximum),             PlayerInfo[playerid][pWarns] = strval(maximum);
    
cache_get_field_content(0"punWarns"maximum),         PlayerInfo[playerid][punWarns] = strval(maximum);
    
cache_get_field_content(0"punWarnstime"maximum),     PlayerInfo[playerid][punWarnstime] = strval(maximum);
    
cache_get_field_content(0"pFuel"maximum),             PlayerInfo[playerid][pFuel] = strval(maximum);
    
cache_get_field_content(0"pRobTime"maximum),         PlayerInfo[playerid][pRobTime] = strval(maximum);
    
cache_get_field_content(0"pExitTied"maximum),         PlayerInfo[playerid][pExitTied] = strval(maximum);
    
cache_get_field_content(0"pExitTiedNomer"maximum),     PlayerInfo[playerid][pExitTiedNomer] = strval(maximum);
    
cache_get_field_content(0"pGrabSkill"maximum),         PlayerInfo[playerid][pGrabSkill] = strval(maximum);
    
cache_get_field_content(0"pGrabTime"maximum),         PlayerInfo[playerid][pGrabTime] = strval(maximum);
    
cache_get_field_content(0"pReportTime"maximum),     PlayerInfo[playerid][pReportTime] = strval(maximum);
    
cache_get_field_content(0"pAutoTime"maximum),         PlayerInfo[playerid][pAutoTime] = strval(maximum);
    
cache_get_field_content(0"pAutoSkill"maximum),         PlayerInfo[playerid][pAutoSkill] = strval(maximum);
    
cache_get_field_content(0"pMarried"maximum),         PlayerInfo[playerid][pMarried] = strval(maximum);
    
cache_get_field_content(0"pMuteTime"maximum),         PlayerInfo[playerid][pMuteTime] = strval(maximum);
    
cache_get_field_content(0"pMobile"maximum),         PlayerInfo[playerid][pMobile] = strval(maximum);
    
cache_get_field_content(0"pBank"maximum),             PlayerInfo[playerid][pBank] = strval(maximum);
    
cache_get_field_content(0"pLocked2"maximum),         PlayerInfo[playerid][pLocked2] = strval(maximum);
    
cache_get_field_content(0"pBoxSkill"maximum),         PlayerInfo[playerid][pBoxSkill] = strval(maximum);
    
cache_get_field_content(0"pKongfuSkill"maximum),     PlayerInfo[playerid][pKongfuSkill] = strval(maximum);
    
cache_get_field_content(0"pKickboxSkill"maximum),     PlayerInfo[playerid][pKickboxSkill] = strval(maximum);
    
cache_get_field_content(0"pFightSkill"maximum),     PlayerInfo[playerid][pFightSkill] = strval(maximum);
    
cache_get_field_content(0"pFightSkil"maximum),         PlayerInfo[playerid][pFightSkil] = strval(maximum);
    
cache_get_field_content(0"pFightTime"maximum),         PlayerInfo[playerid][pFightTime] = strval(maximum);
    
cache_get_field_content(0"pHospital"maximum),         PlayerInfo[playerid][pHospital] = strval(maximum);
    
cache_get_field_content(0"pIzol"maximum),             PlayerInfo[playerid][pIzol] = strval(maximum);
    
cache_get_field_content(0"pDostup"maximum),         PlayerInfo[playerid][pDostup] = strval(maximum);
    
cache_get_field_content(0"pEat"maximum),             PlayerInfo[playerid][pEat] = strval(maximum);
    
cache_get_field_content(0"pZakonp"maximum),         PlayerInfo[playerid][pZakonp] = strval(maximum);
    
cache_get_field_content(0"pVipTime"maximum),         PlayerInfo[playerid][pVipTime] = strval(maximum);
    
cache_get_field_content(0"pHouse"maximum),             PlayerInfo[playerid][pHouse] = strval(maximum);
    
cache_get_field_content(0"pVipData"maximum),         PlayerInfo[playerid][pVipData] = strval(maximum);
    
cache_get_field_content(0"pKolesocar"maximum),         PlayerInfo[playerid][pKolesocar] = strval(maximum);
    
cache_get_field_content(0"pPokraska"maximum),         PlayerInfo[playerid][pPokraska] = strval(maximum);
    
cache_get_field_content(0"pSpoiler"maximum),         PlayerInfo[playerid][pSpoiler] = strval(maximum);
    
cache_get_field_content(0"pHood"maximum),             PlayerInfo[playerid][pHood] = strval(maximum);
    
cache_get_field_content(0"pExhaust"maximum),         PlayerInfo[playerid][pExhaust] = strval(maximum);
    
cache_get_field_content(0"pLamps"maximum),             PlayerInfo[playerid][pLamps] = strval(maximum);
    
cache_get_field_content(0"pSideskirt"maximum),         PlayerInfo[playerid][pSideskirt] = strval(maximum);
    
cache_get_field_content(0"pVozdyx"maximum),         PlayerInfo[playerid][pVozdyx] = strval(maximum);
    
cache_get_field_content(0"pVcol1"maximum),             PlayerInfo[playerid][pVcol1] = strval(maximum);
    
cache_get_field_content(0"pVcol2"maximum),             PlayerInfo[playerid][pVcol2] = strval(maximum);
    
cache_get_field_content(0"pBamper1"maximum),         PlayerInfo[playerid][pBamper1] = strval(maximum);
    
cache_get_field_content(0"pBamper2"maximum),         PlayerInfo[playerid][pBamper2] = strval(maximum);
    
cache_get_field_content(0"pIp"maximum),                strmid(PlayerInfo[playerid][pIp], maximum0strlen(maximum), 64);
    
cache_get_field_content(0"pNitro"maximum),             PlayerInfo[playerid][pNitro] = strval(maximum);
    
cache_get_field_content(0"pGidra"maximum),             PlayerInfo[playerid][pGidra] = strval(maximum);
    
cache_get_field_content(0"pMestoJail"maximum),         PlayerInfo[playerid][pMestoJail] = strval(maximum);
    
cache_get_field_content(0"pWanted"maximum),         PlayerInfo[playerid][pWanted] = strval(maximum);
    
cache_get_field_content(0"pHousecash"maximum),         PlayerInfo[playerid][pHousecash] = strval(maximum);
    
cache_get_field_content(0"pTut"maximum),             PlayerInfo[playerid][pTut] = strval(maximum);
    
cache_get_field_content(0"pNumbercar"maximum),        strmid(PlayerInfo[playerid][pNumbercar], maximum0strlen(maximum), 64);
    
cache_get_field_content(0"pIpReg"maximum),            strmid(PlayerInfo[playerid][pIpReg], maximum0strlen(maximum), 64);
    
cache_get_field_content(0"pCheckKey"maximum),        PlayerInfo[playerid][pCheckKey] = strval(maximum);
    
cache_get_field_content(0"pSuperKey"maximum),        strmid(PlayerInfo[playerid][pSuperKey], maximum0strlen(maximum), 64);
    
cache_get_field_content(0"pDonateAdd"maximum),         PlayerInfo[playerid][pDonateAdd] = strval(maximum);
    if(
GetPVarInt(playerid,"table_ban") == && gPlayerLogged[playerid] == 0)
    {
        new 
strinf[128];
        
format(strinfsizeof(strinf), "SELECT * FROM `table_ban` WHERE `Name_Player` = '%s'"GN(playerid));
        
mysql_function_query(dbHandlestrinftrue"Check_Ban_List""dsd"playerid,GN(playerid),2);
        return 
true;
    }
    
PreloadAllAnimLibs(playerid);
    
SpawnPlayer(playerid);
    return 
true;

Reply
#2

Покажи запрос. Судя по всему, ты перепутал столбец с ником.
Кстати, почему хранишь числа в строковом формате?
Reply
#3

Quote:
Originally Posted by S4D
Посмотреть сообщение
Покажи запрос. Судя по всему, ты перепутал столбец с ником.
Кстати, почему хранишь числа в строковом формате?
Объясните пожалуйста с MySQL работаю впервые.


Запрос:
PHP код:
    mysql_format(dbHandleQUERYMYSQLsizeof(QUERYMYSQL),"SELECT * FROM `accounts` WHERE `Name` = '%s' AND `pKey` = '%s'"GN(playerid), password);
    
mysql_function_query(dbHandleQUERYMYSQLtrue"OnPlayerLoginToServer""ds"playeridpassword); 
Reply
#4

Проблему решил.

PHP код:
    new sendername[24];
    
GetPlayerName(playeridsendername24);
    
mysql_format(dbHandleQUERYMYSQLsizeof(QUERYMYSQL), "SELECT * FROM `"TABLE_ACCOUNT"` WHERE `Name` = '%s' AND `pKey` = '%e'"sendernamepassword);
    
mysql_function_query(dbHandleQUERYMYSQLtrue"OnPlayerLoginToServer""ds"playeridpassword); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)