SA-MP Forums Archive
[Include] RUDO Inc v1.1 Useful Funcitons for MySQL - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] RUDO Inc v1.1 Useful Funcitons for MySQL (/showthread.php?tid=298107)



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.
pawn Код:
#include <rudo.inc>
Functions Example:
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_Int("money", "chars", "charname", name);
Example:
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_Float("angle", "chars", "charname", name);
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_Text("charname", "chars", "charname", name);
Example:
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_IntSet("chars", "money", "300", "charname", name);
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
sql_FloatSet("chars", "angle", "2000", "charname", name);
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:
pawn Код:
WHERE %s = '%s'
to
pawn Код:
WHERE `%s` = '%s'
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:
pawn Код:
WHERE %s = '%s'
to
pawn Код:
WHERE `%s` = '%s'
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