Hello there, hope you're doing great,
So, I'm trying to load few things from a table `Strg`, I have, for example, 2 rows, but only the first row loads, leaving the second ignored for some reason.
This is what should be loaded from the table
This is what prints out
I tried different loops, experimented with lots of things, but it still loads only one row, interestingly, when I skip over the first row for(new Qr = 1; Qr!=rows; Qr++), the second-row loads and vice versa.
I honestly don't know what could be the problem here, just for the record, I'm using MySQL R41-3.
Note: I don't know if this plays any factor in this at all, but the `ID` field is not auto incremented.
I hope someone could provide help, thanks in advance.
So, I'm trying to load few things from a table `Strg`, I have, for example, 2 rows, but only the first row loads, leaving the second ignored for some reason.
PHP Code:
LoadDataEx()
{
mysql_tquery(handle, "SELECT * FROM `Strg`", "SQL_LoadDataEx");
return 1;
}
forward SQL_LoadDataEx();
public SQL_LoadDataEx()
{
new rows = cache_num_rows(), _id;
if(rows)
{
printf("Rows: %d", rows);
for(new Qr = 0; Qr!=rows; Qr++)
{
cache_get_value_name_int(Qr, "ID", _id);
printf("Iterator: %d | ID: %d", Qr, _id);
}
}
return 1;
}
This is what prints out
Code:
Rows: 2
Iterator: 0 | ID: 0
Iterator: 1 | ID: 0
I honestly don't know what could be the problem here, just for the record, I'm using MySQL R41-3.
Note: I don't know if this plays any factor in this at all, but the `ID` field is not auto incremented.
I hope someone could provide help, thanks in advance.