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

can you give me the link of some place where i can see the functions of this plugins, the plugin with threaded queries?

thanks ppl
Reply

Quote:
Originally Posted by caoraivoso3
Посмотреть сообщение
can you give me the link of some place where i can see the functions of this plugins, the plugin with threaded queries?

thanks ppl
For the beginners (like in your case):
https://sampforum.blast.hk/showthread.php?tid=337810
Reply

Quote:
Originally Posted by Edvin
Посмотреть сообщение
For the beginners (like in your case):
https://sampforum.blast.hk/showthread.php?tid=337810
thanks i gonna read it

another problem i get:
if(mysql_errno(handle)) print("MySQL connection is still alive!");
mysql_function_query("CREATE TABLE IF NOT EXISTS ґusersґ(Pnome VARCHAR(24), pSenha VARCHAR(41), pNivel INT(20), pSkin INT(20) )");

well i need some function to replace mysql_function_query. any ideias? that function doesn't work.
Reply

Can anyone provide a static version for windows for R30.

Thanks
Reply

another problem i have and i search all over the place but i don't get any solution for this.

Reply

Quote:
Originally Posted by caoraivoso3
Посмотреть сообщение
thanks but what are the best kind of queries? threaded or unthreaded cuz i don't know nothing about mysql.
If you don't know anything about MySQL, you shouldn't really be using it yet. You need to go read up a bit on how to use it properly, and the different types of queries you can perform.
Reply

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
Can anyone provide a static version for windows for R30.

Thanks
There is only one (1) library which you need: libmysql.dll. There is really no need for a static version.

Quote:
Originally Posted by caoraivoso3
Посмотреть сообщение
another problem i have and i search all over the place but i don't get any solution for this.

Install the Microsoft Visual C++ 2012 32bit redistributables.

EDIT:
It's so quiet here. Has R31 no bugs or what?
Reply

sorry to make a lot of posts here but i have another qustion:
mysql_function_query(g_Handle, "CREATE TABLE IF NOT EXISTS `users` (nome VARCHAR(24), id INT(11), email VARCHAR(12, IsAdmin INT(1)", false, "", "");

g_Handle = connection
i put this ongamemodeinit and that shit just don't work i think i do all the code right, it should create a tabel in the database.
Reply

You forgot a ')' at the end of query
Reply

can you explain?
mysql_function_query(g_Handle, "CREATE TABLE IF NOT EXISTS `users` (nome VARCHAR(24), id INT(11), email VARCHAR(12, IsAdmin INT(1)", false, "", ""));

like this? that doesn't work i don't see where i miss the )
Reply

At the very end.
Reply

I still can't figure it out if i do that the compiler say that i should use ; instead ).
Reply

Add a closing parenthesis, ), at the end of the QUERY, not the line of code (in between the quotations).
Reply

like this?
mysql_function_query(g_Handle, "CREATE TABLE IF NOT EXISTS `users` )(nome VARCHAR(24), id INT(11), email VARCHAR(12, IsAdmin INT(2)", false, "", "");

that doesn't work proprely de tabel isn't created
Reply

Quote:
Originally Posted by caoraivoso3
Посмотреть сообщение
like this?
mysql_function_query(g_Handle, "CREATE TABLE IF NOT EXISTS `users` )(nome VARCHAR(24), id INT(11), email VARCHAR(12, IsAdmin INT(2)", false, "", "");

that doesn't work proprely de tabel isn't created
Holy macarena.
PHP код:
mysql_function_query(g_Handle"CREATE TABLE IF NOT EXISTS `users`(nome VARCHAR(24), id INT(11), email VARCHAR(128), IsAdmin INT(2))"false""""); 
Reply

thanks dude you help me, i wasn't understanding what people are saying. sorry i am a little dumb ahaha
Reply

Ya' don't say..
Reply

Changelog is on R32 and download on R31 ? or R32 is not released? XD
Reply

How do you get the plugin running? I'm using latest version from the repository. Sorry if I missed something, first time testing the latest version.

Trying to test windows version.. when I start the server the plugin doesn't load.
Reply

Quote:
Originally Posted by B-Matt
Посмотреть сообщение
pawn Код:
[ERROR] mysql_escape_string - destination size is too small
Maybe to put string which is the cause of the error? Something like this:

pawn Код:
[ERROR] mysql_escape_string ("Bla bla bla") - destination size is too small
This could be helpful in debugging the errors.
Good idea, I'll change that in every native.

Quote:
Originally Posted by HitnKill
Посмотреть сообщение
I have an idea for don't change all my script with this vR7 MYSQL.

Example my old function

PHP код:
R6
if(IPBanned(plrip) > 0)
{
  
// code....
}
IPBanned(ip[])
{
    new 
query[100],ipexist;
    
format(query,sizeof(query),"SELECT IP FROM `dm_bans` WHERE IP = '%s' LIMIT 1",ip);
    
mysql_query(query);
    
mysql_store_result();
    new 
rows mysql_num_rows();
    if(
rows 0ipexist 1;
    else 
ipexist 0;
    
mysql_free_result();
     return 
ipexist;

PHP код:
R7
if(IPBanned(plrip,0) > 0)
{
   
// code...
}
forward IPBanned(ip[],ID);
public 
IPBanned(ip[],ID)
{
    if(
ID == 0)
    {
        new 
query[100];
        
format(query,sizeof(query),"SELECT IP FROM `dm_bans` WHERE IP = '%s' LIMIT 1",ip);
        
mysql_function_query(ConnexionBDDquerytrue"IPBanned""si",ip,1);
    }
    else
    {
        new 
rows,fields,ipexist;
        
cache_get_data(rowsfields);
        if(
rows 0ipexist 1;
        else 
ipexist 0;
         return 
ipexist;
     }
     return 
0;

Don't problem with this codes on R7 if i call a same function?
This won't work. The upgrade from threaded to unthreaded queries require sometimes a system design change in the gamemode. You could for example load all the data you need with one query (with a JOIN statement) and then if there is some data use the data and ask the player for a login, and if there is no data ask the player to register.

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
I like the errno function! Better than the callback style to the least!

Anyway, just documentation perhaps & this is perfect.
I'll need someone with a Wiki account.

EDIT:
Quote:
Originally Posted by -Prodigy-
Посмотреть сообщение
How do you get the plugin running? I'm using latest version from the repository. Sorry if I missed something, first time testing the latest version.

Trying to test windows version.. when I start the server the plugin doesn't load.
Are you trying to compile it by yourself? Or did you just use the latest download?
What OS are you using? (XP, 7, 8?)
Reply


Forum Jump:


Users browsing this thread: 17 Guest(s)