Home All Groups Group Topic Archive Search About

select a slice of records from a position

Author
7 Nov 2007 10:02 AM
skneife
I need to get a range of records from a specific position like Limit
start,numberOfRecords in mySql:
Example a table with columns name and age:
id      name    age
1       John     20
2       Peter    31
3       Mike     18
....
150   Andrew  45

Now I need to get a slice of records that return at position 3 the 10
next records.
" is the stared position and 10 the slice needed.
Is there a simple way for soing that ?

Sam

Author
7 Nov 2007 12:42 PM
Kerry Moorman
Sam,

In a relational database table, the order of the rows (as well as the
columns) MUST be immaterial to any application using the data.

You need to find a way to retrieve the data you need, based on the DATA, not
its position within the table.

Kerry Moorman


Show quote
"skne***@gmail.com" wrote:

> I need to get a range of records from a specific position like Limit
> start,numberOfRecords in mySql:
> Example a table with columns name and age:
> id      name    age
> 1       John     20
> 2       Peter    31
> 3       Mike     18
> ....
> 150   Andrew  45
>
> Now I need to get a slice of records that return at position 3 the 10
> next records.
> " is the stared position and 10 the slice needed.
> Is there a simple way for soing that ?
>
> Sam
>
>

AddThis Social Bookmark Button