Hi, I'm new in MySQL(R39-2) and I don't know how to load strings, ints and floats from database... I made code by some tutorial from 2012(R7 is used in tutorial). I made this:
Код:
if(mysql_num_rows())
{
if(mysql_retrive_row())
{
mysql_fetch_field_row(dbQUERY, "ID"); Korisnik[playerid][kID] = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Novac"); Korisnik[playerid][kNovac] = floatstr(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Spol"); _HRP_kSpol{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Godine"); _HRP_kGodine{playerid} = strval(dbQUERY);
mysql_fetch_field_row(Korisnik[playerid][kGPCI], "GPCI");
mysql_fetch_field_row(Korisnik[playerid][kRegistracijski_Kod], "Reg_Kod");
mysql_fetch_field_row(Korisnik[playerid][kIP], "IP");
mysql_fetch_field_row(dbQUERY, "Skin"); Korisnik[playerid][kSkin] = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Staff"); _HRP_kStaff{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Dan"); _HRP_kDan{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Mjesec"); _HRP_kMjesec{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Godina"); Korisnik[playerid][kGodina] = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Sat"); _HRP_kSat{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Minuta"); _HRP_kMinuta{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Sekunda"); _HRP_kSekunda{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Mute"); Korisnik[playerid][kMute] = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Online_Brojac"); Korisnik[playerid][kOnline_Counter] = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Melee"); _HRP_kMelee{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Melee_Municija"); _HRP_kMelee_Ammo{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Pistolj"); _HRP_kPistol{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Pistolj_Municija"); _HRP_kPistol_Ammo{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Automatik"); _HRP_kAutomatic{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Automatik_Municija"); _HRP_kAutomatic_Ammo{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Eksploziv"); _HRP_kExplosion{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Eksploziv_Municija"); _HRP_kExplosion_Ammo{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Pistolj_Skill"); Korisnik[playerid][kPistol_Skill] = floatstr(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Shotgun_Skill"); Korisnik[playerid][kPistol_Skill] = floatstr(dbQUERY);
mysql_fetch_field_row(dbQUERY, "UZI_Skill"); Korisnik[playerid][kPistol_Skill] = floatstr(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Automatik_Skill"); Korisnik[playerid][kPistol_Skill] = floatstr(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Rifle_Skill"); Korisnik[playerid][kPistol_Skill] = floatstr(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Kickova"); _HRP_kKickova{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Banova"); _HRP_kBanova{playerid} = strval(dbQUERY);
mysql_fetch_field_row(dbQUERY, "Warnova"); _HRP_kWarnova{playerid} = strval(dbQUERY);
}
}
mysql_free_result();
I got 26 errors because ''mysql_fetch_field_row'' isn't defined. So, how I can load field then?