[ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
Type-R - 19.09.2014
Hey guys, well im trying to save my racing times into the datbase, and so that it would communicate with a Dini through specific ID that the race has. Well, one of the Mysql functions that gets gets field information doesnt want to cooperate.
heres the code:
pawn Код:
if(BuildVehPosCount >= 2)
{
new query[300];
format(rFile, sizeof(rFile), "/rRaceSystem/%s.RRACE", BuildName);
mysql_format(mysql, query, sizeof(query), "INSERT INTO lenktynes (tipas, pavadinimas) VALUES(1, '%s')", BuildName);
mysql_tquery(mysql, query);
format(query,256, "SELECT id FROM lenktynes WHERE pavadinimas = '%s'", BuildName);
new Cache:result = mysql_query(mysql, query);
RaceID = cache_get_field_content_int(0, "id", mysql); //this one
cache_delete(result);
dini_IntSet(rFile, "rID", RaceID);
format(string, sizeof(string), "{FF3300} %i ", RaceID);
SendClientMessageToAll(-1, string);
BuildVehPosCount = 0;
BuildTakeVehPos = false;
ShowDialog(playerid, 605);
}
the error:
Код:
[21:17:33] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[21:17:33] [ERROR] cache_get_field_content_int - invalid datatype
what could be the issue?
Re: [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
Type-R - 19.09.2014
I know, but it just worked out for me that its just a simpler way. Anyway im using Dini for saving all the race info, and all the checkpoints. The reason i want to save this into the database, is so that i could then show the race times on my webpage, otherwise i wouldnt be bothered.
Re: [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
Stinged - 19.09.2014
So just use mysql for your website, and for saving.
Re: [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
Type-R - 19.09.2014
So your telling me that i should store all the checkpoints of the race, the car ID, in the database?
Re: [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
Type-R - 19.09.2014
damn it lol. But still why is this error here? I might get one again, and not know what it is about.
Re: [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
MikeEd - 19.09.2014
Look at other tutorials, you cant jump right into mysql and do as ****** said, dont use INI and MySQL at the same time...
Re: [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
Ihateyou - 20.09.2014
Quote:
Originally Posted by ******
Yes!
|
why would he store static information on mysqll... thats crazy
Re: [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
Type-R - 21.09.2014
Okay, i guess im in this shit again. lol