MySQL Selection fails
#1

I've talked about this error on my other topic, but I decided to post it as new one for few motivations:
-The old topic contains a title of problem that have been fixed
-This new topic with new name can be found by someone else that got my same problem

After that, here's my problem, I'm trying to make a Dynamic car system, I've made the DB, and every thing, when you buy the vehicle it run this query
pawn Код:
//Called on the command to create the Vehicle
format(query, sizeof(query), "INSERT INTO car(Owner, Model, Price, Col1, Col2, cLock, cX, cY, cZ, cA, tID) VALUES ('%s', '%d', '%d', '%d', '%d', '%d', '%f', '%f', '%f', '%f', '%d')",
                                        RUS(playerid), //Name w/out '_'
                                        model,
                                        price,
                                        Car[id][cCol1],
                                        Car[id][cCol2],
                                        Car[id][cLock],
                                        Car[id][cX],
                                        Car[id][cY],
                                        Car[id][cZ],
                                        Car[id][cA],
                                        id);
        print(query); // DEBUG
        mysql_function_query(connection, query, false, "", "");
It just works fine, I've checked the DB and no problem here
But then, I try to Select the information to take the SQLid (the unique ID) from tID (temp ID, taken from GetPlayerVehicleID)
With this query
pawn Код:
//Called when you press ENTER while chosing the colors of vehicle
new query[1024];
                format(query, sizeof(query), "SELECT * FROM car WHERE tID = '%d' LIMIT 1", GetPlayerVehicleID(playerid));
                mysql_function_query(connection, query, true, "SetPlate", "dd", playerid, GetPlayerVehicleID(playerid));
On SetPlate I do:
pawn Код:
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
    //Code here
}
else
{
   //ERROR MESSAGE Here
}
It always return no rows, but printing the query and just do a copy / paste to the SQL Executer it shows the line, without giving error...
Reply


Messages In This Thread
MySQL Selection fails - by Sk1lleD - 24.12.2013, 13:26
Re: MySQL Selection fails - by arakuta - 24.12.2013, 14:35
Re: MySQL Selection fails - by Sk1lleD - 24.12.2013, 14:48
Re: MySQL Selection fails - by Sk1lleD - 24.12.2013, 15:33
Re: MySQL Selection fails - by Sk1lleD - 26.12.2013, 10:43
Re: MySQL Selection fails - by ikey07 - 26.12.2013, 11:50
Re: MySQL Selection fails - by Sk1lleD - 26.12.2013, 13:39
Re: MySQL Selection fails - by Sk1lleD - 26.12.2013, 13:57
Re: MySQL Selection fails - by Sk1lleD - 26.12.2013, 14:42

Forum Jump:


Users browsing this thread: 3 Guest(s)