daily pastebin goal
85%
SHARE
TWEET

Untitled

a guest Jan 12th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stock LoadHouses()
  2. {
  3.     for(new i=0; i<MAX_HOUSES; i++)
  4.     {
  5.         new query[300], savingstring[100];
  6.         format(query, sizeof(query), "SELECT * FROM Houses WHERE HouseID = '%d' LIMIT 1", i);
  7.         mysql_query(query);
  8.         mysql_store_result();
  9.         while(mysql_fetch_row_format(query,"|"))
  10.         {
  11.             mysql_fetch_field_row(savingstring, "HouseOwner");  HInfo[i][HouseOwner] = strval(savingstring);
  12.             mysql_fetch_field_row(savingstring, "HouseName");  HInfo[i][HouseName] = strval(savingstring);
  13.             mysql_fetch_field_row(savingstring, "HouseID");  HInfo[i][HouseID] = strval(savingstring);
  14.             mysql_fetch_field_row(savingstring, "HouseCost"); HInfo[i][HouseCost] = strval(savingstring);
  15.             mysql_fetch_field_row(savingstring, "IconX");  HInfo[i][IconX] = strval(savingstring);
  16.             mysql_fetch_field_row(savingstring, "IconY");  HInfo[i][IconY] = strval(savingstring);
  17.             mysql_fetch_field_row(savingstring, "IconZ");  HInfo[i][IconZ] = strval(savingstring);
  18.  
  19.             printf("%s %s %d %d %f %f %f",HInfo[i][HouseOwner],HInfo[i][HouseName],HInfo[i][HouseID], HInfo[i][HouseCost],HInfo[i][IconX],HInfo[i][IconY],HInfo[i][IconZ]);
  20.         }
  21.         mysql_free_result(); //We must always free a stored result
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top