26.05.2015, 10:44
The code does not work, a little up , please
But maybe its not coming charging, but the INSERT, so here is the code
But maybe its not coming charging, but the INSERT, so here is the code
pawn Код:
public Plante_update(i)
{
new Requete[1024], result[LITTLE_STRING], Requetes[1024];
format(Requetes, sizeof(Requetes), "SELECT COUNT(*) FROM therp_plantes");
mysql_query(Requetes);
mysql_store_result();
mysql_fetch_row(result);
i = strval(result) + 1;
mysql_free_result();
format(Requete, sizeof(Requete),"INSERT INTO therp_plantes SET `Type`='%d', `Variete`='%d', `Sexe`='%d', `Recolte`='%d', `Temps`='%d', `X`='%f', `Y`='%f', `Z`='%f'",
Plante_infos[i][Plante_type],
Plante_infos[i][Plante_variete],
Plante_infos[i][Plante_sexe],
Plante_infos[i][Plante_recolte],
Plante_infos[i][Plante_temps],
Plante_infos[i][Plante_X],
Plante_infos[i][Plante_Y],
Plante_infos[i][Plante_Z]);
mysql_query(Requete);
return 1;
}