S
S
sitev_ru2015-08-11 12:41:46
MySQL
sitev_ru, 2015-08-11 12:41:46

How to get from 11th to 20th lines?

I make a selection, but not all lines need to be displayed, but only from the 11th to the 20th lines. MySQL database.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Chekalin, 2015-08-11
@sitev_ru

SELECT * FROM table LIMIT 10,10;

N
Nikolai Novosad, 2015-08-11
@nik_neman

if by id, then you can do this:
SELECT * FROM table WHERE id BETWEEN 11 and 20

S
Sergey Petrochenko, 2015-08-11
@serg160485

It’s easier for you to cut it off on the output side, you got an array, for example, in php and parse it foreach

$i=0;
foreach($array as $item){

  if(10<$i || $i>19)
    continue;
echo $item['ваше_значение'];
  $i++;
}

Or maybe so
SELECT * FROM table LIMIT 11, 10

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question