RUDO Inc v1.1 Useful Funcitons for MySQL -
Rudo2 - 19.11.2011
Foreword
My first include.I am next time to mixed functions adding.Now of adding to include for mysql functions.Good luck.
Use
Top of the script.
Functions- sql_Int(column[], table[], condition[], conditionif[]) - Reading Integer
Example:
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_Int("money", "chars", "charname", name);
- sql_Float(column[], table[], condition[], conditionif[]) - Reading Float
Example:
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_Float("angle", "chars", "charname", name);
- sql_Text(column[], table[], condition[], conditionif[]) Reading Text
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_Text("charname", "chars", "charname", name);
- sql_IntSet(table[], column[], setcolumn, condition[], conditionif[]) - Update Integer
Example:
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_IntSet("chars", "money", "300", "charname", name);
- sql_FloatSet(table[], column[], Float : setcolumn, condtion[], conditionif[]) - Update Float
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_FloatSet("chars", "angle", "2000", "charname", name);
- sql_Set(table[], column[], setcolumn[], condition[], conditionif[]) - Update Text
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_Set("chars", "pass", "pass123456", "charname", name:);
Succession and Bug
Download
Download Rudo Inc v1.1
Re: RUDO Inc v1.1 Useful Funcitons for MySQL -
wups - 19.11.2011
Not easier for me.
Anyway you should change:
to
And
pawn Код:
sql_Int("money", "chars", charname, name);
should be
pawn Код:
sql_Int("money", "chars", "charname", name);
Re: RUDO Inc v1.1 Useful Funcitons for MySQL -
Rudo2 - 19.11.2011
Thanks. I had a problem, but I am change.
Re: RUDO Inc v1.1 Useful Funcitons for MySQL -
[Hiphop]LiBeRtY - 08.12.2011
Thanks Rudo2
Re: RUDO Inc v1.1 Useful Funcitons for MySQL -
iggy1 - 08.12.2011
Quote:
Originally Posted by wups
Not easier for me.
Anyway you should change:
to
|
You can omit those symbols if you want, they are not needed. Only Apostrophe's around strings are needed. (not table/column names)
Your syntax is valid but not necessary.
pawn Код:
"SELECT userid, password, email FROM userdata WHERE username='%s'" //valid
@OP Suggestion:
Have a look at the "BUD" include by slice, you could make a "multiget" or "multiset" type function which would be better than running one query per value.
Re: RUDO Inc v1.1 Useful Funcitons for MySQL -
TheArcher - 08.12.2011
can you add paste bin link it might be useful for someone.
Re: RUDO Inc v1.1 Useful Funcitons for MySQL - T0pAz - 08.12.2011
It's looking nice but a pastebin link would be better.
Re: RUDO Inc v1.1 Useful Funcitons for MySQL -
Zh3r0 - 08.12.2011
Yay, new funcitons!
Re: RUDO Inc v1.1 Useful Funcitons for MySQL -
Rudo2 - 11.12.2011
I am not released Rudo Include
Re: RUDO Inc v1.1 Useful Funcitons for MySQL -
WorldWideRoleplay - 11.12.2011
Nice keep the good work