[HELP] How to use unlimited syntaxes using { Float, _ }: ...
#1

Well like the title says, how do do this ?
I have a peace of code on my your sql include using this method:

Function:
pawn Код:
stock yoursql_insert(table[],values[])
{
    new query[256];format(query,sizeof query,"INSERT INTO %s (%s) VALUES (%s)",table,GetStructure(table),values);
    return mysql_query(query,-1,-1,connection);
}
Usage:
pawn Код:
new string[128];
format(string,sizeof string,"'%s',%i,%i",yoursql_escape_string(PlayerInfo[playerid][UserName]),PlayerInfo[playerid][money],PlayerInfo[playerid][score]);
yoursql_insert("users",string)
Which i want to convert to:

Usage:
pawn Код:
yoursql_insert("users","sii",yoursql_escape_string(PlayerInfo[playerid][UserName]),PlayerInfo[playerid][money],PlayerInfo[playerid]);
I know this can be done using getargs(), setargs() and numargs(), i tried it but i just cant get it to work. My test code :http://pastebin.com/CYz6FR80
Reply


Messages In This Thread
[HELP] How to use unlimited syntaxes using { Float, _ }: ... - by gamer931215 - 19.03.2011, 18:47
Re: [HELP] How to use unlimited syntaxes using { Float, _ }: ... - by Hiddos - 19.03.2011, 18:49
Re: [HELP] How to use unlimited syntaxes using { Float, _ }: ... - by gamer931215 - 19.03.2011, 19:06
Re: [HELP] How to use unlimited syntaxes using { Float, _ }: ... - by gamer931215 - 19.03.2011, 20:47

Forum Jump:


Users browsing this thread: 1 Guest(s)