Posts: 845
Threads: 3
Joined: Jun 2010
Код:
git clone --recursive https://github.com/pBlueG/SA-MP-MySQL.gi...6285317git checkout tags/R39-3
git submodule update
cd boost_1_57_0/
sudo bash bootstrap.sh --prefix=/usr/local --with-libraries=system,chrono,thread,date_time,atomic,filesystem
sudo ./b2 variant=release link=static threading=multi address-model=32 runtime-link=shared -j2 -d0 install
cd ..
sudo ldconfig
make
These are the commands to compile R39-3 on Linux (implying you downloaded the boost 1.57 source and unzipped it into the folder "boost_1_57_0").
To compile the master branch, those commands stay mostly the same. Just remove the second and third command ("git checkout" and "git submodule") and execute these before "make":
Код:
mkdir build
cd build
cmake ..
Posts: 845
Threads: 3
Joined: Jun 2010
That means that there is no static MySQL client library to link with the static MySQL plugin. This is normal on CentOS though, thus you can and should only compile and use the standard (dynamic) MySQL plugin. You can compile it directly by calling "make dynamic".
Posts: 607
Threads: 90
Joined: Feb 2011
Reputation:
0
Which function to use?
mysql_query, mysql_tquery or mysql_pquery?
Posts: 1,113
Threads: 127
Joined: Jul 2008
Reputation:
0
If you want to use mysql_tquery(send a threaded query) you will have to provide a callback(public function). It can be an inline(y_inline) function but at the end, its the same.
To use it like your example, you would need to use mysql_query. It is the only one that returns a result refference.
Posts: 607
Threads: 90
Joined: Feb 2011
Reputation:
0
And can I mix mysql_query and mysql_tquery?
Posts: 1,113
Threads: 127
Joined: Jul 2008
Reputation:
0
Ofcourse! You can use whichever is needed for the query.
Posts: 845
Threads: 3
Joined: Jun 2010
Try re-downloading R39-3 (and don't forget to replace the libmysql.dll).
Do you have the parameter pool_size in mysql_connect set to zero?
Posts: 47
Threads: 8
Joined: Jun 2015
Reputation:
0
The problem is that I can't use newer version than R34, as right now I'm using Windows XP, which doesn't support KERNEL32 library.
EDIT: pool_size was added in R35, so I can't even use it. :\
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
It doesn't work like that at all. Every field is already fetched separately and you don't have to split it yourself. You can get the value either by the position in the result or by column name, which is slightly slower.