17.11.2014, 18:10
there is two Tables , The First i called hem Propreties , he contains this
But if you put the
in SQL search he will give you the The first code (above ) + column of pw_weapon and pw_ammo besides Messages column
and there is another Table , wich i called hem Proprety_weapons , his work to save each proprety(house) with 6 slots of weapons , and he acualty doing it , he saves the weapon ID and the AMMO ,
hope you understand me ,
PHP код:
HouseInfo[idx][hdbID] = tmp;
HouseInfo[idx][hEntrancex] = cache_get_row_float(currentRow, fx++, dbhandle);
HouseInfo[idx][hEntrancey] = cache_get_row_float(currentRow, fx++, dbhandle);
HouseInfo[idx][hEntrancez] = cache_get_row_float(currentRow, fx++, dbhandle);
HouseInfo[idx][hExitx] = cache_get_row_float(currentRow, fx++, dbhandle);
HouseInfo[idx][hExity] = cache_get_row_float(currentRow, fx++, dbhandle);
HouseInfo[idx][hExitz] = cache_get_row_float(currentRow, fx++, dbhandle);
HouseInfo[idx][hHealthx] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hHealthy] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hHealthz] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hArmourx] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hArmoury] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hArmourz] = cache_get_row_int(currentRow, fx++, dbhandle);
cache_get_row(currentRow, fx++, HouseInfo[idx][hOwner], dbhandle, 255);
cache_get_row(currentRow, fx++, HouseInfo[idx][hDiscription], dbhandle, 255);
HouseInfo[idx][hValue] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hHel] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hArm] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hInt] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hLock] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hOwned] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hRooms] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hRentabil] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hRent] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hTakings] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hLevel] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hWorld] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hSetted] = 1;
HouseInfo[idx][hDrugs] = cache_get_row_int(currentRow, fx++, dbhandle);
HouseInfo[idx][hMaterials] = cache_get_row_int(currentRow, fx++, dbhandle);
cache_get_row(currentRow, fx++, HouseInfo[idx][hMessage], dbhandle, 255);
PHP код:
Query
PHP код:
SELECT p.*, pw.weapon AS pw_weapon, pw.ammo AS pw_ammo FROM properties p LEFT JOIN property_weapons pw ON pw.pid = p.id ORDER BY p.id ASC, pw.id ASC
and there is another Table , wich i called hem Proprety_weapons , his work to save each proprety(house) with 6 slots of weapons , and he acualty doing it , he saves the weapon ID and the AMMO ,
PHP код:
mysql_tquery_inline(dbhandle, "SELECT p.*, pw.weapon AS pw_weapon, pw.ammo AS pw_ammo FROM properties p LEFT JOIN property_weapons pw ON pw.pid = p.id ORDER BY p.id ASC, pw.id ASC", using inline SQLLoadProperty, "");