04.04.2012, 17:46
Hi,
I have already posted this in at the german forum, but I haven't get an answer, yet.
So I hope you guys can help me.
I just tried to install the MySQL-Plugin for my SA-MP Server. I wrote some functions, like reading an integer in the database.
But if I try to include them in a empty test-script, I'll become an run time error.
The plugin was loaded succesfully.
This is the function causeing the error:
I uses the plugin by G-StyleZzZ.
Greetings red13
I have already posted this in at the german forum, but I haven't get an answer, yet.
So I hope you guys can help me.
I just tried to install the MySQL-Plugin for my SA-MP Server. I wrote some functions, like reading an integer in the database.
But if I try to include them in a empty test-script, I'll become an run time error.
The plugin was loaded succesfully.
This is the function causeing the error:
PHP код:
public DB_READ_INT(table[],ID,inhalt[]){
new query[200];
format(query,200,"SELECT %s FROM %s WHERE ID = %d",inhalt,table,ID);
mysql_query(query); // <== If I delete this and the following lines, it will work.
mysql_store_result();
if(mysql_num_rows() != 0){
new data;
data = mysql_fetch_int();
mysql_free_result();
return data;
}
else{
mysql_free_result();
return -1;
}
Greetings red13