SA-MP Forums Archive
Simple problem ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Simple problem ? (/showthread.php?tid=616414)



Simple problem ? - StR_MaRy - 04.09.2016

hey guys i have this error in my mysql_log

Код HTML:
[ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') (Query: "SELECT * FROM `others`")
Код HTML:
gQuery[0] = (EOS);
	mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `safes`");
	mysql_tquery(handle, gQuery, "LoadSafes", "");

	gQuery[0] = (EOS);
	mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `zones`");
	mysql_tquery(handle, gQuery, "LoadZones", "");

	gQuery[0] = (EOS);
	mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `houses`");
	mysql_tquery(handle, gQuery, "LoadHouses", "");

	gQuery[0] = (EOS);
	mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `cars`");
	mysql_tquery(handle, gQuery, "LoadCar", "");

	gQuery[0] = (EOS);
	mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `housefurnitures`");
	mysql_tquery(handle, gQuery, "LoadFurnitures", "");

	gQuery[0] = (EOS);
	mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `business`");
	mysql_tquery(handle, gQuery, "LoadBusiness", "");

	gQuery[0] = (EOS);
	mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `clans`");
	mysql_tquery(handle, gQuery, "LoadClans", "");

        gQuery[0] = (EOS);
        mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `dsveh`");
	mysql_tquery(handle, gQuery, "LoadDSVeh", "");

	gQuery[0] = (EOS);
	mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `others`");
	mysql_tquery(handle, gQuery, "LoadOthers", "");
Код HTML:
function LoadOthers()
{
	new rows, fields;
	cache_get_data(rows, fields, handle);

	new tmp[128];
	cache_get_field_content(0, "Tax", tmp);			Tax = strval(tmp);
	cache_get_field_content(0, "Charity", tmp);		CharityMoney = strval(tmp);
	return 1;
}
what is wrong why i get that error ?


Re: Simple problem ? - Stinged - 04.09.2016

There are no rows in the table `others`


Re: Simple problem ? - StR_MaRy - 04.09.2016

thx it worked