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

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?
Reply
#2

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.
Reply
#3

So just use mysql for your website, and for saving.
Reply
#4

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

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

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

Quote:
Originally Posted by ******
Посмотреть сообщение
Yes!
why would he store static information on mysqll... thats crazy
Reply
#8

Okay, i guess im in this shit again. lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)