23.03.2009, 14:44
I have mysql plugin and working sql server on my localhost...
This works fine, i receive message that connection to mysql successfull.
I make a table in database called - "IPs".
How to make that on player connect, script insert that players IP adress in my database table IPs? If that IP exists - brake that action and not insert that IP again.
I need to answer in this question and this could be my beginning to the samp + sql
pawn Код:
#define MYSQL_HOST "127.0.0.1"
#define MYSQL_USER "root"
#define MYSQL_PASS ""
#define MYSQL_DB "EFR"
pawn Код:
//OnGameModeInit
samp_mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS);
samp_mysql_select_db(MYSQL_DB);
samp_mysql_close();
I make a table in database called - "IPs".
How to make that on player connect, script insert that players IP adress in my database table IPs? If that IP exists - brake that action and not insert that IP again.
I need to answer in this question and this could be my beginning to the samp + sql
