13.04.2013, 03:23
Take a look at the syntax for the cache_get_row() function.
The first argument is to determine the row to select information from. The second argument is to determine which field to select information from, and obviously, the third is which var to store the information into.
So, if you wanted to do something like "SELECT * FROM `houses`" and load up all of the houses in your database, you need to make a loop. Like this:
The first argument is to determine the row to select information from. The second argument is to determine which field to select information from, and obviously, the third is which var to store the information into.
So, if you wanted to do something like "SELECT * FROM `houses`" and load up all of the houses in your database, you need to make a loop. Like this:
pawn Код:
// ...
cache_get_data(rows, fields);
if(rows > 0)
{
for(new i = 0; i < rows; i++)
{
cache_get_row(i, 0, temp);
// ...
}
}
// ...

