[Plugin] [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by dusk
Посмотреть сообщение
Are you sure you're using the R39-2 includes aswell? Or maybe you're compiling your gamemode with different ones?
in .inc header say
Код:
/**
 * MySQL plugin R39-2
 */
it's really R39-2 i'm search in inc found this

Код:
#define mysql_function_query(%0,%1,%2,%3,"%4"%5) 	mysql_tquery(%0,%1,%3,#%4%5)
i have one pawno folder in my pc not use other and i have one gamemode not many gamemode
Reply

The function which the plugin will call must be a string name of it.
pawn Код:
mysql_function_query(handle,"SET NAMES TIS620",false,"sendquery");

EDIT: another question.

pawn Код:
mysql_pquery_inline(DbHandle,query,using inline FishingGearLoad, "i",playerid);
I found a similiar example here. I want to know if there's actually a point in passing "playerid" to the inline function?


Also, I get these errors
pawn Код:
\pawno\include\a_mysql.inc(228) : error 017: undefined symbol "AMX_GetRelativeAddress"
\LT-RP\pawno\include\a_mysql.inc(231) : error 017: undefined symbol "Callback_Array"
Reply

You can, of course, pass other parameters (or none at all) to the inline callback, just like with a normal callback.
Some YSI-functions are undefined here, are you sure you have the whole YSI package installed?
Reply

I was sure... But after I re-downloaded it the errors went away.
Reply

getting a 403 on download
Reply

Quote:
Originally Posted by TakeiT
Посмотреть сообщение
getting a 403 on download
https://github.com/pBlueG/SA-MP-MySQL/releases

It's fine for me.
Reply

Is there anything close to mysql_fetch_row() or mysql_fetch_row_format() where I can get a result set that I can then parse to my own liking w/ sscanf rather than having to use ORMs or field-by-field retrievals via cache_get_row()? I understand the idea of making this plugin frameworkish though I preferred to work directly with raw SQL like the older plugin allowed.
Reply

That string with the '|' delimiter is not "raw SQL", it was internally (in the plugin) generated in a for-loop with a 'cache_get_row()' like function. Thus it doesn't really make sense generating a string from all fields and then breaking it apart again through a parser (sscanf). 'cache_get_row()' is the only way (of course there are other ways, but they are also calling 'cache_get_row' internally) to retrieve data directly from the cached result set (because the "raw SQL" result is a 2D-string-array; the indices which are needed to access a field are the first two parameters in 'cache_get_row' and that field is directly stored into the third parameter passed to 'cache_get_row').
Reply

Link broken
Reply

Give me working link for R7 ubuntu plugin!
Reply

Hey, I got a question.

How can I check whether the server is connected to the mysql server or not?
As far as I know, the function mysql_ping is not longer supported, is it?
Reply

pawn Код:
new Database;

//OnGameModeInit()
public OnGameModeInit()
{
    Database = mysql_connect(..);
    if(mysql_errno(Database) != 0)return print("An error occured connecting to database.");
    return 1;
}
Reply

I'm looking for R7 version for Windows 64 bit. Please give me a link.
Reply

Same but the R5 for linux

It will be perfect if you can fix the links :P Thanks!
Reply

Quote:
Originally Posted by [CG]Milito
Посмотреть сообщение
Hey, I got a question.

How can I check whether the server is connected to the mysql server or not?
As far as I know, the function mysql_ping is not longer supported, is it?
Sure, it is.

pawn Код:
handle = mysql_connect("host", "user", "database", "password");

if(handle && mysql_errno(handle) == 0)
    print("[MYSQL]: Connection to database was established!");
else
    print("[MYSQL]: Connection to database failed!");
Reply

Quote:
Originally Posted by WhoIsYourDaddy
Посмотреть сообщение
I'm looking for R7 version for Windows 64 bit. Please give me a link.
I can give you working link for that after I get home.
Reply

Quote:
Originally Posted by WhoIsYourDaddy
Посмотреть сообщение
I'm looking for R7 version for Windows 64 bit. Please give me a link.
plugin-R7-win32_vs9
http://www.datafilehost.com/d/a57d6504

There you go!
Reply

Quote:
Originally Posted by liinor
Посмотреть сообщение
plugin-R7-win32_vs9
http://www.datafilehost.com/d/a57d6504

There you go!
I Don't know why you people guiding each other with this old versions (R5, R6, R7).
Why you guys want to start with that old versions?

...

How can i compile the plugin? What things i will need?
Reply

Quote:
Originally Posted by iFarbod
Посмотреть сообщение
How can i compile the plugin? What things i will need?
https://github.com/pBlueG/SA-MP-MySQL#build-instruction
Reply

Quote:
Originally Posted by iFarbod
Посмотреть сообщение
I Don't know why you people guiding each other with this old versions (R5, R6, R7).
Why you guys want to start with that old versions?
Probably they are running old(er) gamemodes which are using R7 or below. I guess they don't have the time/skills/will to update their gamemode to the latest version. But I can ensure everybody here, it's worth it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)