0

Is it possible to count all the rows in a table even if we add a LIMIT on our query?

SELECT * FROM table LIMIT 0,10

for example the table contains 100 rows, how can I get that "100" with only one query even if there is a LIMIT on that query?

Sam San
  • 6,567
  • 8
  • 33
  • 51

1 Answers1

0

i think it's easy use your PHP code to make (0,10) as varialbes like ($a,$b)

then you do: $count = $b-$a;

usama sulaiman
  • 2,013
  • 4
  • 24
  • 37