27.05.2012, 19:16
Don't only define it, also create the connection!
The port parameter is optional, so in case your MySQL server runs on port 3306, you don't have to specify it:
I hope the parameter names are self-explanatory. See the plugin's own topic for such documentation. This tutorial actually presumes that the scripter has slight knowledge of how MySQL server works, how the SQL language works and how to implement BlueG's plugin for their server. However if one lacks such knowledge, it is easy to obtain it from one of the several tutorials on this board alone or the official topic once again!
Thanks, I'm glad you have a hang of it now.
And excuse me for my attitude on a few occasions!
No problem. I don't know if we're alike, but for at least a year or so, and more specifically after starting to learn programming at a university, improvements to coding practices make me a lot happier. Things such as knowing the advantages of threaded queries or code changes like
No problem and good luck scripting!
pawn Code:
new dbHandle;
// Whereever you connect!
mysql_connect("localhost", "root", "database", "password", 3306);
pawn Code:
mysql_connect("localhost", "root", "database", "password");
Quote:
Thank you so much for this, I can't begin to explain how grateful I am. Everything seems to be going along nicely now. I haven't really set up the table properly yet as it's early days.
I now understand the purpose of threaded queries, and shouldn't have said the things I said in the mySQL plugin topic! |
And excuse me for my attitude on a few occasions!
Quote:
Not bad I guess, thanks for the heads up. Nice to see it forces me using threaded queries, knowing I had to switch over to them a long time ago.
|
pawn Code:
if(IsPlayerInAnyVehicle(playerid))
{
vID = GetPlayerVehicleID(playerid);
}
// to:
vID = GetPlayerVehicleID(playerid);
if(vID != 0)
{
}