How to select rows staring from a row whithout limits?

I want to select rows starting from a row like this:

SELECT * FROM table WHERE Type=1 LIMIT $Start,infinity

Upvotes: 1

Views: 36

Answers (2)

Mohd Abdul Mujib
Mohd Abdul Mujib

Reputation: 13908

If you have a primary key say id, you can use

SELECT * FROM table WHERE Type = 1 AND id >= $Start;

Upvotes: 1

Racil Hilan
Racil Hilan

Reputation: 25341

There is nothing to indicate infinity in MySQL. To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter:

SELECT * FROM table WHERE Type=1 LIMIT $Start, 99999999999999999999;

Upvotes: 0

Related Questions