MySQL Order By help
#2

I'm a little rusty to this, haven't done it in a while but if you were going to use ORDER BY I'm pretty certain you don't need the WHERE statement as well...you're already getting something in return in a certain way.

pawn Код:
stock ShowPlayerVehicleList(playerid)
{
    new query[500];
    format(query, sizeof(query), "SELECT * FROM ownedvehicles ORDER BY slot [DESC]");
    mysql_function_query(dbHandle, query, true, "OnVehicleListDisplay", "i", playerid);
}
I left [DESC] (obviously remove the brackets if you were going to use it though) in there if you wanted to order them by descending order, if not it's defaulted to ascending.
Reply


Messages In This Thread
MySQL Order By help - by PaulDinam - 20.03.2013, 01:41
Re: MySQL Order By help - by Toni - 20.03.2013, 01:53
Re: MySQL Order By help - by PaulDinam - 20.03.2013, 01:58
Re: MySQL Order By help - by Toni - 20.03.2013, 02:04

Forum Jump:


Users browsing this thread: 1 Guest(s)