php - select every other row in MySQL without depending on any ID? -
php - select every other row in MySQL without depending on any ID? -
considering next table doesn't have primary key, can select every other row?
col1 col2 2 1 b 3 c 12 g
first select must find: 2, 3
second select must find: 1, 12
is possible?
in unique mysql fashion:
select * ( select * , @rn := @rn + 1 rn table1 bring together (select @rn := 0) ) s rn mod 2 = 0 -- utilize = 1 other set
example @ sql fiddle.
php mysql sql mysqli-multi-query
Comments
Post a Comment