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

I got a error, don't really know how to get over of this shit

Код:
mysql_format(pms, query, "UPDATE playeracc SET playername=%s WHERE id=%d", pNome(playerid), userid[playerid]);
mysql_function_query(pms, query, false, "MySQL_Return", "");
error
Код:
[19:17:46] ProcessQueryThread(MySQL_Return) - Executing query UPDATE playeracc SET playername=Rodolf_Pasqueto WHERE id=1...
[19:17:46] ProcessQueryThread(MySQL_Return) - Error will be triggered to OnQueryError().
I'm pretty sure that I have the playeracc table.
Reply

Quote:
Originally Posted by TheArcher
Посмотреть сообщение
Can you explain me the difference between static and non-static, please? :/
The static version include the libmysqlclient file, ideal for shared hosted servers.
Reply

Does this plugin still wonderfully crash the entire server when doing a GMX? I liked that function a lot

Edit: Seems it works normal again now
Reply

I'm providing compiled versions of the latest mysql revisions:
linux, linux-static and windows: http://mellnik.com right side
Reply

What's wrong with it? -
PHP код:
new mq[64];
   
format(mq,sizeof(mq),"SELECT * FROM SRR_usr");
   
mysql_function_query(g_ConnectionHandle,mq,false,"","");
   
mysql_store_result();
   
vsegoplayer mysql_num_rows();
   
mysql_free_result();
  
printf("There are - %d players",vsegoplayer); 
Reply

Quote:
Originally Posted by kamilot73
Посмотреть сообщение
What's wrong with it? -
PHP код:
new mq[64];
   
format(mq,sizeof(mq),"SELECT * FROM SRR_usr");
   
mysql_function_query(g_ConnectionHandle,mq,false,"","");
   
mysql_store_result();
   
vsegoplayer mysql_num_rows();
   
mysql_free_result();
  
printf("There are - %d players",vsegoplayer); 
From R7 MySQL removed the support for non-threaded queries.
Reply

Quote:
Originally Posted by costel_nistor96
Посмотреть сообщение
From R7 MySQL removed the support for non-threaded queries.
Can you help me, I don't know how relise it correctly.
Reply

Quote:
Originally Posted by kamilot73
Посмотреть сообщение
Can you help me, I don't know how relise it correctly.
With the mysql_function_query, you are to do the work in the callback you specify.

pawn Код:
mysql_function_query( dbHandle, Query, true, "OnPlayerSampleSQL", "i", playerid );

forward OnPlayerSampleSQL( playerid ); public OnPlayerSampleSQL( playerid ) {
{
    new
        rows, fields, Field[ 50 ]
    ;
    cache_get_data( rows, fields );
    if( rows )
    {
        cache_get_field_content( 0, "POTATO", Field );
    }
    return 1;
}
Usage of cache, I stole it from an old version of my gamemode with cache. Of course it won't work, just study the functions and make correct usage of them and it should. That is an example!

________________________

Do we have to escape strings in R7 and up?
Reply

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Do we have to escape strings in R7 and up?
What do you mean? You always do.
Reply

when i open the server using MySQL r15 for Windows...

"Could not locate the procedure entry point __ crtCreateSymbolicLinkW in dynamic link library MSVCR110.dll"

some solution ?
Reply

Quote:
Originally Posted by [Y]Falcon
Посмотреть сообщение
when i open the server using MySQL r15 for Windows...

"Could not locate the procedure entry point __ crtCreateSymbolicLinkW in dynamic link library MSVCR110.dll"

some solution ?
Quote:
Originally Posted by Brendan_Thomson
Посмотреть сообщение
Quote:
Originally Posted by Brendan_Thomson
Посмотреть сообщение
I'm getting an error asking for MSVCP110.dll.. I'm running windows 8 which supposedly has the latest .NET framework.. is there something I'm missing? I downloaded the c++ redistrubutable thing also.. spent an hour or two last night googling around trying to find a solution.. to no avail
FYI for anyone getting this - download this.

http://www.microsoft.com/en-us/downl....aspx?id=30679
Was posted two pages back.
Reply

Okay I just tested it with different strings, and I think the issue might be with enumerators only.
because this:
pawn Code:
cache_get_row(0, 0, gServerInfo[serverHostname]);
returs null.

However this:
pawn Code:
new
    str[64];
cache_get_row(0, 0, str);
returns the right string.

Can someone confirm this?
Reply

Maxips2, there's a bug with the sizeof operator and enums used together.

pawn Code:
enum e_TOP_TEN
{
    FINISH_MS,
    PLAYER_REGID,
    PLAYER_NAME[MAX_PLAYER_NAME]
}
new raceTopTen[10][e_TOP_TEN];
Using this example enumeration, you would expect
pawn Code:
sizeof(raceTopTen[0][PLAYER_NAME])
to return something it is not going to return.

So you'll have to explicitly (as of plugin R8 or something like that) specify the 4th and 5th parameters (connection and sizeof destination) in your cache_get_row_line.
pawn Code:
cache_get_row(0, 0, gServerInfo[serverHostname], 1, 64);
// or...
cache_get_row(0, 0, gServerInfo[serverHostname], .max_len=64);
Source

I was actually thinking of releasing a plugin myself, perhaps called "Simple MySQL plugin" or something due to its stripped down nature (everything except for the cache-related and required functions are removed). Also never have I had to face a crash due to the plugin.
Reply

Ahh I see... thanks, its finally working properly
Reply

Problems like this wouldn't occur if they finally release an update for MD arrays ...
Reply

Anybody have a D/L link to the R8 plugin & includes, For some reason the domain won't resolve for me

Cheers!
Reply

I've just got a problem with MySQL Plugin. It says that i miss some ".dll" files from win32 so i downloaded them and place on system32 folder and now i get this error: "The procedure entry point _crtCreateSymbolicLinkW could not be located in the dynamic link library MSVCR110.dll"
What may i do?
Reply

uhh.. Looks like a nice error over here...

Code:
[05:08:32]   Loaded.
[05:08:32]  Loading plugin: mysql.so
[05:08:32]   Failed (plugins/mysql.so: symbol _ZNSdD2Ev, version GLIBCXX_3.4 not defined in file libstdc++.so.6 with link time reference)
[05:08:32]  Loaded 5 plugins.
Reply

Dude your links are down.
Reply

Solved.~~~~~~~~~~
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)