Mysql Error
#1

Код HTML:
[03:19:56 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:19:56 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:19:56 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:01 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:01 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:01 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:01 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:06 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:06 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:06 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:06 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:11 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:11 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:11 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:11 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:16 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:16 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:16 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:16 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:21 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:21 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:21 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:21 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:26 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:26 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:26 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:26 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:31 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:31 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:31 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:31 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:37 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:37 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:37 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:37 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:42 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:42 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:42 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:42 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:47 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:47 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:47 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:47 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:52 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:52 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:52 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:52 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:20:57 09/19/16] [ERROR] mysql_format - destination size is too small
[03:20:57 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:20:57 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:20:57 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:02 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:02 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:02 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:02 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:07 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:07 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:07 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:07 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:12 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:12 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:12 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:12 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:18 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:18 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:18 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:18 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:23 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:23 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:23 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:23 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:28 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:28 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:28 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:28 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:33 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:33 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:33 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:33 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:38 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:38 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:38 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:38 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:43 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:43 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:43 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:43 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:48 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:48 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:48 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:48 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:53 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:53 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:53 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:53 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:21:58 09/19/16] [ERROR] mysql_format - destination size is too small
[03:21:58 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:21:58 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:21:58 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:22:04 09/19/16] [ERROR] mysql_format - destination size is too small
[03:22:04 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:22:04 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:22:04 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:22:09 09/19/16] [ERROR] mysql_format - destination size is too small
[03:22:09 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:22:09 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:22:09 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:22:14 09/19/16] [ERROR] mysql_format - destination size is too small
[03:22:14 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:22:14 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:22:14 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:22:19 09/19/16] [ERROR] mysql_format - destination size is too small
[03:22:19 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:22:19 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:22:19 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:22:24 09/19/16] [ERROR] mysql_format - destination size is too small
[03:22:24 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:22:24 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:22:24 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:22:29 09/19/16] [ERROR] mysql_format - destination size is too small
[03:22:29 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:22:29 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:22:29 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
[03:22:34 09/19/16] [ERROR] mysql_format - destination size is too small
[03:22:34 09/19/16] [ERROR] CMySQLQuery::Execute - (error #1065) Query was empty (Query: "")
[03:22:34 09/19/16] [WARNING] cache_get_row_count - no active cache
[03:22:34 09/19/16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
i found where the problem is from where i get those ""

Код HTML:
new playerid,giverid,actionid,actiontime,complaint,reason[64],stringg[256],playername[30],givername[30],dm,reason2[64];
	//Check panel
	mysql_format(handle, gQuery, sizeof(handle), "SELECT * FROM `panelactions`");
	new Cache:result = mysql_query(handle, gQuery);
	if(cache_get_row_count() > 0)
	{
		for(new i, j = cache_get_row_count (); i != j; ++i)
		{
		    playerid                    = cache_get_field_content_int(i, "playerid");
		    giverid                     = cache_get_field_content_int(i, "giverid");
   			actionid                    = cache_get_field_content_int(i, "actionid");
   			actiontime                  = cache_get_field_content_int(i, "actiontime");
   			complaint                 	= cache_get_field_content_int(i, "complaintid");
			dm							= cache_get_field_content_int(i, "dm");
   			cache_get_field_content(i, "playername", playername, handle, sizeof(playername));
   			cache_get_field_content(i, "givername", givername, handle, sizeof(givername));
   			cache_get_field_content(i, "reason", reason, handle, sizeof(reason));
            if(actionid == 1)
   			{
      			if(complaint > 0)
         		{
        			format(stringg,sizeof(stringg),"AdmPanel: %s has been banned by %s for %d days, reason: %s [complaint:%d].",playername,givername,actiontime,reason,complaint);
   					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s [complaint:%d]",reason,complaint);
				}
				else
				{
    				format(stringg,sizeof(stringg),"AdmPanel: %s has been banned by %s for %d days, reason: %s.",playername,givername,actiontime,reason);
	    			SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s",reason);
				}
				mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO punishlogs (`playerid`,`giverid`,`actionid`,`actiontime`,`reason`,`playername`,`givername`) VALUES ('%d','%d','1','%d','%s','%s','%s')",playerid,giverid,actiontime,reason2,playername,givername);
				mysql_tquery(handle, gQuery, "","");
				foreach(Player, idd)
				{
					if(PlayerInfo[idd][pSQLID] == playerid)
					{
						Kick(idd);
					}
				}
			}
			else if(actionid == 2)
   			{
      			if(complaint > 0)
         		{
        			format(stringg,sizeof(stringg),"AdmPanel: %s has been permanent banned by %s, reason: %s [complaint:%d].",playername,givername,reason,complaint);
 					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s [complaint:%d]",reason,complaint);
				}
				else
				{
    				format(stringg,sizeof(stringg),"AdmPanel: %s has been permanent banned by %s, reason: %s.",playername,givername,reason);
   					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s",reason);
				}
				mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO punishlogs (`playerid`,`giverid`,`actionid`,`actiontime`,`reason`,`playername`,`givername`) VALUES ('%d','%d','2','0','%s','%s','%s')",playerid,giverid,reason2,playername,givername);
				mysql_tquery(handle, gQuery, "","");
				foreach(Player, idd)
				{
					if(PlayerInfo[idd][pSQLID] == playerid)
					{
						Kick(idd);
					}
				}
			}
			else if(actionid == 3)
   			{
      			if(complaint > 0)
         		{
        			format(stringg, sizeof(stringg), "AdmPanel: %s was jailed by %s for %d minutes, reason: %s [complaint:%d]",playername,givername,actiontime,reason,complaint);
					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s [complaint:%d]",reason,complaint);
				}
				else
				{
    				format(stringg, sizeof(stringg), "AdmPanel: %s was jailed by %s for %d minutes, reason: %s",playername,givername,actiontime,reason);
					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s",reason);
				}
				mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO punishlogs (`playerid`,`giverid`,`actionid`,`actiontime`,`reason`,`playername`,`givername`) VALUES ('%d','%d','6','%d','%s','%s','%s')",playerid,giverid,actiontime,reason2,playername,givername);
				mysql_tquery(handle, gQuery, "","");
				foreach(Player, idd)
				{
					if(PlayerInfo[idd][pSQLID] == playerid)
					{
						ResetPlayerWeapons(idd);
						PlayerInfo[playerid][pWanted] = 0;
						Update(playerid,pWantedx);
						SetPlayerWantedLevel(playerid,0);
						PlayerInfo[idd][pJailed] = 2;
						PlayerInfo[idd][pJailTime] = actiontime*60;
						PlayerInfo[idd][pBail] = 0;
						SetPlayerInterior(idd, 10);
				      	SetPlayerInterior(idd, 10);
						new randp = random(sizeof(JailSpawn));
						SetPlayerPos(idd, JailSpawn[randp][0], JailSpawn[randp][1], JailSpawn[randp][2]);
						if(dm > 0)
						{
							PlayerInfo[idd][pGunLic] = 0;
						}
					}
				}
			}
			else if(actionid == 4)
   			{
      			if(complaint > 0)
         		{
        			format(stringg, sizeof(stringg), "AdmPanel: %s received a warn from admin %s, reason: %s [complaint:%d].",playername,givername,reason,complaint);
					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s [complaint:%d]",reason,complaint);
				}
				else
				{
    				format(stringg, sizeof(stringg), "AdmPanel: %s received a warn from admin %s, reason: %s.",playername,givername,reason);
					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s",reason);
				}
				mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO punishlogs (`playerid`,`giverid`,`actionid`,`actiontime`,`reason`,`playername`,`givername`) VALUES ('%d','%d','5','%d','%s','%s','%s')",playerid,giverid,actiontime,reason2,playername,givername);
				mysql_tquery(handle, gQuery, "","");
				foreach(Player, idd)
				{
					if(PlayerInfo[idd][pSQLID] == playerid)
					{
						PlayerInfo[idd][pWarns] += 1;
					}
				}
				mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE `id`='%d' ORDER BY `id`",playerid);
				new Cache:resultt = mysql_query(handle, gQuery);
				if(cache_get_row_count() > 0)
				{
					new warns,time;
					for(new is, js = cache_get_row_count (); is != js; ++is)
					{
						warns                    = cache_get_field_content_int(is, "Warnings");
					}
					if(warns > 2)
					{
						format(stringg, sizeof(stringg), "AdmPanel: %s has been banned by AdmBot for 3 days, reason: 3/3 warns.",playername);
						time = gettime() + (3*86400);
						mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO bans (PlayerName, AdminName, Reason, IP, Days, IPBan, Permanent, Active, Time) VALUES('%s', 'AdmBot', '3/3 warns', '0', 3, 0, 0, 1, %d)",
						playername,time);
						mysql_tquery(handle, gQuery, "","");
						mysql_format(handle, gQuery, sizeof(gQuery), "UPDATE `users` SET `Warnings`='0' WHERE `name`='%s'",playername);
						mysql_tquery(handle, gQuery, "","");
						mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO punishlogs (`playerid`,`giverid`,`actionid`,`actiontime`,`reason`,`playername`,`givername`) VALUES ('%d','0','1','3','3/3 warns','%s','AdmBot')",playerid,playername);
						mysql_tquery(handle, gQuery, "","");
						SendClientMessageToAll(COLOR_LIGHTRED, stringg);
						foreach(Player, idd)
						{
							if(PlayerInfo[idd][pSQLID] == playerid)
							{
								Kick(idd);
							}
						}
					}
				}
				cache_delete(resultt);
			}
			else if(actionid == 5)
   			{
      			if(complaint > 0)
         		{
        			format(stringg, sizeof(stringg), "AdmPanel: %s has been muted by %s for %d minutes, reason: %s [complaint:%d].",playername,givername,actiontime,reason,complaint);
					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s [complaint:%d]",reason,complaint);
				}
				else
				{
    				format(stringg, sizeof(stringg), "AdmPanel: %s has been muted by %s for %d minutes, reason: %s.",playername,givername,actiontime,reason);
					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s",reason);
				}
				mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO punishlogs (`playerid`,`giverid`,`actionid`,`actiontime`,`reason`,`playername`,`givername`) VALUES ('%d','%d','7','%d','%s','%s','%s')",playerid,giverid,actiontime,reason2,playername,givername);
				mysql_tquery(handle, gQuery, "","");
				foreach(Player, idd)
				{
					if(PlayerInfo[idd][pSQLID] == playerid)
					{
						PlayerInfo[idd][pMuted] = 1;
						PlayerInfo[idd][pMuteTime] = actiontime*60;
					}
				}
			}
			else if(actionid == 6)
   			{
      			if(complaint > 0)
         		{
        			format(stringg, sizeof(stringg), "AdmPanel: %s has been kicked by %s, reason: %s [complaint:%d].",playername,givername,reason,complaint);
					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s [complaint:%d]",reason,complaint);
				}
				else
				{
    				format(stringg, sizeof(stringg), "AdmPanel: %s has been kicked by %s, reason: %s.",playername,givername,reason);
					SendClientMessageToAll(COLOR_LIGHTRED, stringg);
					format(reason2,sizeof(reason2),"%s",reason);
				}
				mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO kicklogs (`playerid`,`giverid`,`playername`,`givername`,`reason`) VALUES ('%d','%d','%s','%s','%s')", playerid,giverid,playername,givername,reason2);
				mysql_tquery(handle, gQuery, "","");
				foreach(Player, idd)
				{
					if(PlayerInfo[idd][pSQLID] == playerid)
					{
						Kick(idd);
					}
				}
			}
		}
		mysql_query(handle, "DELETE FROM `panelactions`");
	}
	cache_delete(result);
but what is wrong with this ?
Reply
#2

I'll explain,Go back to your previous thread (https://sampforum.blast.hk/showthread.php?tid=617292) post that new code and wait! That's it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)