I'm trying to display a listing of 6 columns from a database table. This table happens to have a bit over 30,000 records. What I've used in the past worked but this time the list ends at 10,939 records and won't display at all unless I add the LIMIT clause to the line.
The table name is phpbb_users and the column I'm sorting on is username. The goal is to display a listing of everyone, displaying about 8 other data fields.
If I use this code:
$sql = "SELECT * FROM phpbb_users ORDER BY username";
$result = $conn->query($sql);
and then follow with the usual while ($row = $result->fetch_assoc()) stuff that displays every line the query fails and no listing appears.
If I change the code to:
$sql = "SELECT * FROM phpbb_users ORDER BY username LIMIT 10000";
the listing appears, but it only displays the first 10,000 records.
Is there some kind of limit to how many records can be read in a MySQLi SELECT query? I didn't have this problem when I was running PHP 5.6 and MySQL but I just upgraded to PHP 7.2 and MySQLi and the new code isn't working the same way.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…