List:General Discussion« Previous MessageNext Message »
From:Edward Kay Date:February 26 2008 3:02pm
Subject:RE: Select form a list
View as plain text  
>  i have list where I would like make a select, this list look like this
>
> id  Properties   Others
> *****************
> 1        1               sssssss
> 2        2               sss
> 3        2               aaaaa etc...
> 4        2
> 5        2
> 6        1
> 7        2
> 8        2
> 9        1
> ......
> imagine that  from  this list  I only want to select those registers that
> propiertis are 1, but now all the registers but only 2 each time. For
> example, i got id 1, so i would like to select only registers
> with 1 and 6,
> and if i starts from id 6, i should be able to select 6 and 9 and no more.
>
> How can I do that?
>

SELECT * from list WHERE properties = 1 AND id >= [starting ID] LIMIT 2;

Edward

Thread
Select form a listPau Marc Munoz Torres26 Feb
  • RE: Select form a listEdward Kay26 Feb