19.06.2012, 08:41
Hello.
I had an simple problem, so if i want to load and save some things it doesnt do that.
but this problem is only on my server at www.nitrado.net (german hoster)
if i start my script on my computer, it works!
here's some code:
Kasse (it's german) = cashbox.
lagerbestand (it's german too) = stock
my mysql_GetInt function:
So, here are 2 screens of the table on the server and on my localhost.
server:
Sorry, its german but u can use the ****** translator.
localhost:
I hope you can help me.
I had an simple problem, so if i want to load and save some things it doesnt do that.
but this problem is only on my server at www.nitrado.net (german hoster)
if i start my script on my computer, it works!
here's some code:
pawn Код:
public SaveInfos()
{
mysql_SetInt("infotab", "Bestand", lagerbestand, "Info", "Lager");
mysql_SetInt("infotab", "Bestand", Kasse[Staat], "Info", "StaatsKasse");
mysql_SetInt("infotab", "Bestand", Kasse[Samd], "Info", "SAMDKasse");
mysql_SetInt("infotab", "Bestand", Kasse[Sana], "Info", "SANAKasse");
mysql_SetInt("infotab", "Bestand", Kasse[Oamt], "Info", "OAMTKasse");
mysql_SetInt("infotab", "Bestand", Kasse[Grove], "Info", "GSKasse");
mysql_SetInt("infotab", "Bestand", Kasse[Ballas], "Info", "BALLASKasse");
mysql_SetInt("infotab", "Bestand", Kasse[Fahrschule], "Info", "SchulKasse");
}
public LoadInfos()
{
lagerbestand = mysql_GetInt("infotab", "Bestand", "Info", "Lager");
Kasse[Staat] = mysql_GetInt("infotab", "Bestand", "Info", "StaatsKasse");
Kasse[Samd] = mysql_GetInt("infotab", "Bestand", "Info", "SAMDKasse");
Kasse[Sana] = mysql_GetInt("infotab", "Bestand", "Info", "SANAKasse");
Kasse[Oamt] = mysql_GetInt("infotab", "Bestand", "Info", "OAMTKasse");
Kasse[Grove] = mysql_GetInt("infotab", "Bestand", "Info", "GSKasse");
Kasse[Ballas] = mysql_GetInt("infotab", "Bestand", "Info", "BALLASKasse");
Kasse[Fahrschule] = mysql_GetInt("infotab", "Bestand", "Info", "SchulKasse");
}
lagerbestand (it's german too) = stock
my mysql_GetInt function:
pawn Код:
stock mysql_GetInt(Table[], Field[], Where[], Is[])
{
new query[128];
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Is, Is);
format(query, 128, "SELECT `%s` FROM `%s` WHERE `%s` = '%s'", Field, Table, Where, Is);
mysql_query(query);
mysql_store_result();
new sqlint = mysql_fetch_int();
mysql_free_result();
return sqlint;
}
server:
Sorry, its german but u can use the ****** translator.
localhost:
I hope you can help me.