[ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')

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
                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?

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.

So just use mysql for your website, and for saving.

So your telling me that i should store all the checkpoints of the race, the car ID, in the database?

damn it lol. But still why is this error here? I might get one again, and not know what it is about.

Look at other tutorials, you cant jump right into mysql and do as ****** said, dont use INI and MySQL at the same time...

Originally Posted by ******
Посмотреть сообщение
why would he store static information on mysqll... thats crazy

Okay, i guess im in this shit again. lol

Forum Jump:

Users browsing this thread: 1 Guest(s)