Answer the question
In order to leave comments, you need to log in
Why so many resulting rows?
SELECT COUNT(*) FROM page ORDER BY id LIMIT 0, 1
Result: 940
How can this be?
Answer the question
In order to leave comments, you need to log in
You obviously have a wrong use of LIMIT. LIMIT selects the specified number of rows from the result.
Your result is one line with the value in column 940. It is displayed accordingly.
count(*) always returns one row, whether you set a limit or not. The limit here has nothing to do with line numbers. To get the last line you need to use something likeselect * from page order by id desc limit 1
Stop asking questions about small technical details that you are confused about.
Ask immediately about the main task, so that they explain to you how to do it CORRECTLY.
"I get one row from the database" - WHY?
"I want to know with the query above whether the last one is" - why?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question