Mysql loading dont work
#1

stock LoadHouse(houseid)
{
new query[100];
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `houses` WHERE `HouseID` = '%d' LIMIT 1", houseid);
HouseInfo[houseid][ID] = cache_get_field_content_float(0, "HouseID");
HouseInfo[houseid][hEnterX] = cache_get_field_content_float(0, "EnterX");
HouseInfo[houseid][hEnterY] = cache_get_field_content_float(0, "EnterY");
HouseInfo[houseid][hEnterZ] = cache_get_field_content_float(0, "EnterZ");
HouseInfo[houseid][hExitX] = cache_get_field_content_float(0, "ExitX");
HouseInfo[houseid][hExitY] = cache_get_field_content_float(0, "ExitY");
HouseInfo[houseid][hExitZ] = cache_get_field_content_float(0, "ExitZ");
HouseInfo[houseid][hInsideInt] = cache_get_field_content_int(0, "InsideInt");
HouseInfo[houseid][hInsideVir] = cache_get_field_content_int(0, "InsideVir");
HouseInfo[houseid][hOutsideInt] = cache_get_field_content_int(0, "OutsideInt");
HouseInfo[houseid][hOutsideVir] = cache_get_field_content_int(0, "OutsideVir");
HouseInfo[houseid][hOwned] = cache_get_field_content_int(0, "Owned");
HouseInfo[houseid][hLocked] = cache_get_field_content_int(0, "Hlocked");
HouseInfo[houseid][hInventory] = cache_get_field_content_int(0, "HouseInventory");
HouseInfo[houseid][hSecurity] = cache_get_field_content_int(0, "HouseSecurity");
HouseInfo[houseid][hPrice] = cache_get_field_content_int(0, "Price");
HouseInfo[houseid][hType] = cache_get_field_content_int(0, "HouseType");
HouseInfo[houseid][hQuality] = cache_get_field_content_int(0, "HouseQuality");
cache_get_field_content(0, "Owner", HouseInfo[houseid][hOwner]);
return 1;
}

What is wrong with this code? it doesnt load, in other words variables dont save info from mysql (no compile errors)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)