31.12.2011, 08:36
Right, I decided to have a go at MySQL, I looked at omse tutorials but non of them go as far as I need them to do. Basically Im up to here:
I installed wamp.
I created car saving database:

And added this in my gamemode:
And now, I need some code for public SaveCar, public LoadCar, so it saves those functions in to that database or however it works and the it loads them, so please someone help me out. Thx.
((Also IDK if I used correct setting in my DB, I used float for the parameters that USE float, for everything else I used INS, is thar right or does that need changing?))
I installed wamp.
I created car saving database:

And added this in my gamemode:
pawn Код:
#include <mysql>
forward ConnectMySQL();
public ConnectMySQL()
{
mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
if(mysql_ping() == 1)
{
// mysql_debug(1);
printf("[MYSQL]: Connection to `%s` succesful!", SQL_DB);
}
else
{
printf("[MYSQL]: [ERROR]: Connection to `%s` failed!", SQL_DB);
}
return 1;
}
((Also IDK if I used correct setting in my DB, I used float for the parameters that USE float, for everything else I used INS, is thar right or does that need changing?))