21.01.2015, 21:23
Even though you're searching for up to 10 rows, you may not get 10 rows everytime.
It's best to check the amount of rows returned from your query and loop through them.
That will prevent you accessing non-existing data/rows.
The error is pretty clear: invalid row-index.
This means row 10 doesn't exist in the result.
It's the same as accessing an array beyond it's limits.
Just try a pretty standard query like
SELECT * FROM players WHERE Name = 'Test' LIMIT 1
And try accessing row 200 or something really outside the range of your query.
You should get the same error.
It's best to check the amount of rows returned from your query and loop through them.
That will prevent you accessing non-existing data/rows.
The error is pretty clear: invalid row-index.
This means row 10 doesn't exist in the result.
It's the same as accessing an array beyond it's limits.
Just try a pretty standard query like
SELECT * FROM players WHERE Name = 'Test' LIMIT 1
And try accessing row 200 or something really outside the range of your query.
You should get the same error.