BlueG MySQL only loading 1 row
#7

Quote:
Originally Posted by Logic_
Посмотреть сообщение
There are tons of mistakes in your code!

Why are you adding +1 to the loop ID? The arrays start from 0 not 1 and you should.
PHP код:
HouseInfo[i+1][HouseID]); 
Remove the if statement in the loop. That clearly doesn't makes sense if your house row IDs have auto increment.

SQL is a relational database, make use of foreign keys. Make a separate table dedicated to house weapons!
PHP код:
          cache_get_value_int(i"Weapons0"HouseInfo[i+1][HouseWeapons][0]); 
            
cache_get_value_int(i"Weapons1"HouseInfo[i+1][HouseWeapons][1]); 
            
cache_get_value_int(i"Weapons2"HouseInfo[i+1][HouseWeapons][2]); 
            
cache_get_value_int(i"Weapons3"HouseInfo[i+1][HouseWeapons][3]); 
            
cache_get_value_int(i"Weapons4"HouseInfo[i+1][HouseWeapons][4]); 
            
cache_get_value_int(i"Weapons5"HouseInfo[i+1][HouseWeapons][5]); 
            
cache_get_value_int(i"Weapons6"HouseInfo[i+1][HouseWeapons][6]); 
            
cache_get_value_int(i"Weapons7"HouseInfo[i+1][HouseWeapons][7]); 
            
cache_get_value_int(i"Weapons8"HouseInfo[i+1][HouseWeapons][8]); 
            
cache_get_value_int(i"Weapons9"HouseInfo[i+1][HouseWeapons][9]); 
            
cache_get_value_int(i"Weapons10"HouseInfo[i+1][HouseWeapons][10]); 
            
cache_get_value_int(i"Weapons11"HouseInfo[i+1][HouseWeapons][11]); 
            
cache_get_value_int(i"Weapons12"HouseInfo[i+1][HouseWeapons][12]); 
            
cache_get_value_int(i"Weapons13"HouseInfo[i+1][HouseWeapons][13]); 
            
cache_get_value_int(i"Weapons14"HouseInfo[i+1][HouseWeapons][14]); 
            
cache_get_value_int(i"Weapons15"HouseInfo[i+1][HouseWeapons][15]); 
            
cache_get_value_int(i"Weapons16"HouseInfo[i+1][HouseWeapons][16]); 
            
cache_get_value_int(i"Weapons17"HouseInfo[i+1][HouseWeapons][17]); 
            
cache_get_value_int(i"Weapons18"HouseInfo[i+1][HouseWeapons][18]); 
            
cache_get_value_int(i"Weapons19"HouseInfo[i+1][HouseWeapons][19]); 
            
cache_get_value_int(i"Weapons20"HouseInfo[i+1][HouseWeapons][20]); 
(( Ewww, Yuck! ))

Just run this query separately once you've loaded all the houses!
PHP код:
            new query[128]; 
            
mysql_format(g_SQLquerysizeof query"SELECT * FROM furniture WHERE HouseID = %d"HouseInfo[i+1][HouseID]); 
            
mysql_tquery(g_SQLquery"OnLoadFurniture""d"i); 
becomes
PHP код:
mysql_tquery(g_SQL"SELECT * FROM furniture""OnLoadFurnitures"); 
That doesn't fix the issue at all, I'm still getting the same result as before. I have changed the code accordingly though.
Reply


Messages In This Thread
BlueG MySQL only loading 1 row [SOLVED] - by seanny - 23.04.2018, 20:57
Re: BlueG MySQL only loading 1 row - by AmigaBlizzard - 23.04.2018, 21:05
Re: BlueG MySQL only loading 1 row - by seanny - 23.04.2018, 21:08
Re: BlueG MySQL only loading 1 row - by Phreak - 23.04.2018, 21:09
Re: BlueG MySQL only loading 1 row - by seanny - 23.04.2018, 21:11
Re: BlueG MySQL only loading 1 row - by Logic_ - 24.04.2018, 09:27
Re: BlueG MySQL only loading 1 row - by seanny - 24.04.2018, 15:58
Re: BlueG MySQL only loading 1 row - by UFF - 24.04.2018, 16:47
Re: BlueG MySQL only loading 1 row - by seanny - 24.04.2018, 17:11
Re: BlueG MySQL only loading 1 row - by Phreak - 24.04.2018, 17:28

Forum Jump:


Users browsing this thread: 2 Guest(s)