Today while doing a query by type PhpMyAdmin
SELECT * FROM tabela
, I noticed that after a query in the database the query automatically gets the LIMIT
, in this way SELECT * FROM tabela LIMIT 0 , 30
, that is, if I am correct, it starts with the first record and it shows 30 results. That intrigued me, because in PHP
I do these querys and send everything to a table, but what if for a year I make more than 100 entries and want to see them all? I can never foresee the limit of it. In php I thought I would use a variable for the limit, which received COUNT
of all records in the table, or make a subquery of type SELECT * FROM TABELA LIMIT (SELECT COUNT(*) FROM TABELA)
. I just look for methods that might help in the future.