MYSQL is even possible ?
#1

Hey guys is possible to connect to DB from a FS ?

if yes , how

if now , thx
Reply
#2

Yes, connect to the DB from OnFilterScriptInIt same as you'll do in a gamemode
Reply
#3

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
Yes, connect to the DB from OnFilterScriptInIt same as you'll do in a gamemode
i get this error

Код HTML:
[17:41:13] [WARNING] CMySQLHandle::Create - connection already exists
shouldn't work if i do it in include ? and use that include where i want to use the DB ?
Reply
#4

As far as I'm aware opening multiple connections should work. But you can also "export" the connection handle from the gamemode so you can use the same connection. There are multiple ways to do this. You can use SVars or properties or CallRemoteFunction.
Reply
#5

Well,

State your MySQL connection in an include,

pawn Код:
new MySQL:yourconnection;
And then state this include on top of both your gamemode and the include you're going to create.

That should probably work. But, I'd create another connection and connect to the same database, if I were you.

It is possible to create multiple connections with BlueG's MySQL Plugin.
Reply
#6

OK, thx all of you all your info's helped me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)