PDA

View Full Version : MySQL - DESC limit ?? - Help!


nGen.SoNNy
12/05/2012, 09:54 AM
What's wronk on this MySQL function...? I just to show just 15 playername from that table! Help REP++;

stock GetClanMembers(clan[])
{
new clanquery[200];
new minfo[512];
new string[512];
format(clanquery, sizeof(clanquery), "SELECT * FROM members ORDER BY (isinclan) DESC limit 15 WHERE clanname = '%s'", clan);
//format(clanquery, sizeof(clanquery), "SELECT * FROM members WHERE clanname = '%s'", clan);
mysql_query(clanquery);
mysql_store_result();
while(mysql_fetch_row_format(clanquery,"|"))
{
mysql_fetch_field_row(string,"playername");
format(minfo,sizeof(minfo),"%s\n"W"Name: "G"%s",minfo, string);
}
mysql_free_result();
return minfo;
}

[HiC]TheKiller
12/05/2012, 09:57 AM
format(clanquery, sizeof(clanquery), "SELECT * FROM members WHERE clanname = '%s' ORDER BY isinclan DESC LIMIT 15 ", clan);


Give that a go.

nGen.SoNNy
12/05/2012, 09:59 AM
Thx BRO:X [HiC]TheKiller = REP++; :))