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

can anybody give me a link to the mysql r7 windows please.
Reply

I Love ****** :\

R6:
http://www.solidfiles.com/d/a96c367d03/MYSQLR6.rar

R7:
There is no one to answer to my question
i am using mysql_tquery now, but speed is now like a turtle
Reply

Hello, i use R5, and i have this problem (i have Debian VPS)
Quote:

[19:21:01] Loading plugin: mysql.so
[19:21:01] Failed (libssl.so.6: cannot open shared object file: No such file or directory)

Do you know how to fix it?... Help me.
Reply

Quote:
Originally Posted by CoR3
Посмотреть сообщение
Hello, i use R5, and i have this problem (i have Debian VPS)

Do you know how to fix it?... Help me.
Upload the libssl.so file into your servers folder.
Reply

Quote:
Originally Posted by Abagail
Посмотреть сообщение
That plug-in version is not supported. Upgrade your script to use a supported version such as R39-2.
i change the version for r39-2, and when i compiled it show me some errors, i think that some functions change, and i have to change some lines... the problem is....

change mysql_store_result for ??
change mysql_num_rows for ?
change mysql_free_result for ?
change mysql_fetch_row for ?

Help me please.
Reply

Quote:
Originally Posted by fonia5
Посмотреть сообщение
can anybody give me a link to the mysql r7 windows please.
Here you go!
INCLUDE(View in Browser)
INCLUDE(Direct Download)

Plugins:
Windows: DOWNLOAD
Linux: DOWNLOAD

Your welcome!
Reply

Hello !

I use MySQL R39-2.

My cache_insert_id return 0.

pawn Код:
mysql_format(MySQLConnect, query, 1024, "INSERT INTO `vehs` (`ModelID`, `PosX`, `PosY`, `PosZ`, `PosA`, `Couleur1`, `Couleur2`) VALUES (%d, '%f', '%f', '%f', '%f', %d, %d)", VehInfo[entry][ModelID], VehInfo[entry][Pos][0], VehInfo[entry][Pos][1], VehInfo[entry][Pos][2], VehInfo[entry][Pos][3], couleur1, couleur2);

mysql_tquery(MySQLConnect, query);

printf("%d", cache_insert_id());
Return 0 :/

Can u help me?
Reply

Код:
mysql_format(MySQLConnect, query, 1024, "INSERT INTO `vehs` (`ModelID`, `PosX`, `PosY`, `PosZ`, `PosA`, `Couleur1`, `Couleur2`) VALUES (%d, '%f', '%f', '%f', '%f', %d, %d)", VehInfo[entry][ModelID], VehInfo[entry][Pos][0], VehInfo[entry][Pos][1], VehInfo[entry][Pos][2], VehInfo[entry][Pos][3], couleur1, couleur2);

mysql_tquery(MySQLConnect, query, "ReturnCallback", "");

forward ReturnCallback();
public ReturnCallback()
{
printf("%d", cache_insert_id());
}
Your're using threaded queries! You have to specify callback to get your data's.
Reply

Umm, i have few questions (not releated to mysql totaly):
1. Is mysql faster than sqlite?
2. Does mysql uses less memory than sqlite??
3. Well, can i use sql browser to explore the mysql table

OT: Can it be possible to read and write INI files from web, PHP stuff?
If yes, please PM me with a solution that actually works. I literally need it!
Reply

  1. Depends on the query.
  2. No, more.
  3. No. Most people use phpMyAdmin but there are stand-alone tools like MySQL Workbench.
Yes, PHP can read and parse ini files relatively simple, but if you need to retrieve those files from an external server then it becomes more difficult because you will first need to copy those files to your local server via the FTP functions in PHP. Don't ask me how to do that, I've never tried.

---

On another note, I would very much like to see better internal handling of NULL values. If a NULL value appears in a non-string column and you try to retrieve it with the _int or _float functions you will get errors. Maybe add another optional parameter to cache_get_row_int and cache_get_row_float that allows the user to specify a default value should the field be NULL.

I know you can use IFNULL in the query to circumvent the problem, but if you have a lot of fields that can be NULL then it can significantly lengthen the query. Especially if you also want to add an alias for use with the cache_get_field_content functions.
Reply

@Vince.

Firstly I have to thank you for replying my other post yet.

Hello, I have a Chinses character problem.

I have a string data (like "你好" in English is "hello")that stored by Mysql and I use this plugin.

I get this content via mysql plugin, and I just print it on my Console, it show me "" not "你好".
so I decided test SendClientMessage this string that contains some Chinses character that samp-server.exe console showed "', the server crashed....

Sorry I dont know what make it a problem , Mysql plugin ? or PAWN.

Can you tell me how to fix it or whats this problem is.

THANK YOU.
Reply

Quote:
Originally Posted by Michalec
Посмотреть сообщение
Код:
mysql_format(MySQLConnect, query, 1024, "INSERT INTO `vehs` (`ModelID`, `PosX`, `PosY`, `PosZ`, `PosA`, `Couleur1`, `Couleur2`) VALUES (%d, '%f', '%f', '%f', '%f', %d, %d)", VehInfo[entry][ModelID], VehInfo[entry][Pos][0], VehInfo[entry][Pos][1], VehInfo[entry][Pos][2], VehInfo[entry][Pos][3], couleur1, couleur2);

mysql_tquery(MySQLConnect, query, "ReturnCallback", "");

forward ReturnCallback();
public ReturnCallback()
{
printf("%d", cache_insert_id());
}
Your're using threaded queries! You have to specify callback to get your data's.

Hello !

If I have 3 vehicles (For exemple) the cache_insert_id it's good!

But, if i restart my serveur.. And I buy a new vehicle... The cache_insert_id it's 1.. While it should be 4...
Reply

Quote:
Originally Posted by Vince
Посмотреть сообщение
  1. Depends on the query.
  2. No, more.
  3. No. Most people use phpMyAdmin but there are stand-alone tools like MySQL Workbench.
Yes, PHP can read and parse ini files relatively simple, but if you need to retrieve those files from an external server then it becomes more difficult because you will first need to copy those files to your local server via the FTP functions in PHP. Don't ask me how to do that, I've never tried.

---

On another note, I would very much like to see better internal handling of NULL values. If a NULL value appears in a non-string column and you try to retrieve it with the _int or _float functions you will get errors. Maybe add another optional parameter to cache_get_row_int and cache_get_row_float that allows the user to specify a default value should the field be NULL.

I know you can use IFNULL in the query to circumvent the problem, but if you have a lot of fields that can be NULL then it can significantly lengthen the query. Especially if you also want to add an alias for use with the cache_get_field_content functions.
Thanks, that helped me!
Reply

What's up with the links? They show forbidden for me.
Reply

1. Does this plugin work with drop in mysql replacements like mariadb?
2. If I were to host the mysql database in the US and the sa:mp server in the EU, would this cause lag on the server?
Thanks.
Reply

Quote:
Originally Posted by im
Посмотреть сообщение
1. Does this plugin work with drop in mysql replacements like mariadb?
2. If I were to host the mysql database in the US and the sa:mp server in the EU, would this cause lag on the server?
Thanks.
1. Yes.
2. Yes, it would cause lag if you are using unthreaded queries. Threaded queries do not affect the SA:MP server.
Reply

Hi.
How can I get R6 plugin version, since downloading link is not working?
Reply

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
2. Yes, it would cause lag if you are using unthreaded queries. Threaded queries do not affect the SA:MP server.
If the ping from the EU server to the US server is about 100, it would delay all queries by 100 milliseconds, right?
Reply

Can we edit/delete columns even after creating the table. (SQLITE don't support this right?)
Reply

Quote:
Originally Posted by Neufox
Посмотреть сообщение
Can we edit/delete columns even after creating the table. (SQLITE don't support this right?)
You can edit or delete columns on both MySQL and SQLite.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)