24.05.2014, 19:43
Exemplo:
Fonte: https://sampforum.blast.hk/showthread.php?tid=356261
pawn Код:
public MySQL_Start(){
MysqlC = mysql_connect(mysql_host,mysql_user,mysql_database,mysql_password);
if(!MysqlC)
return print("Nгo foi possivel conectar a database, verifique as definiзхes novamente.");
else {
mysql_function_query(MysqlC,
"CREATE TABLE IF NOT EXISTS `users` (\
`id` int(11) NOT NULL, AUTO_INCREMENT,\
`name` varchar(25) NOT NULL, \
`password` varchar(25) NOT NULL, \
`level` int(11) NOT NULL, \
`bank` int(11) NOT NULL, \
`skin` int(11) NOT NULL, \
`money` int(11) NOT NULL, \
PRIMARY KEY(`id`)\
)",false,"r@MySQL_Start","s","users");
}
return 1;
}