Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI_DB_result->next_row keeps returning last row, causing infinite loop #2298

Closed
svivian opened this issue Mar 2, 2013 · 0 comments
Closed

Comments

@svivian
Copy link

svivian commented Mar 2, 2013

Working with a query result, the functions next_row and previous_row when called continually, never stop. When it gets to the end of the rows from the database, next_row just keeps returning the last row over and over.

It means some code like: while ( $row = $query->next_row() ) {} causes an infinite loop. (My code was a bit more complex, but it did essentially boil down to that.)

When there are no more results, shouldn't it return false or null ?

@narfbg narfbg closed this as completed in 5780d8b Mar 4, 2013
nonchip pushed a commit to nonchip/CodeIgniter that referenced this issue Jun 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants