Display different result for every 2 records ?? Please help
Date: November 03, 2009 05:41AM
Hi,
When I select * from my table, I would like to display 2 records where AgentName = John and then 2 Records where AgentName = Ant and then repeat.
I can use Limit to display 10 records per page but I would like to display the firts 2 records where AgentName is John and then 2 Records where Agent Name is Ant and then next two again John and next 2 again Ant.
I tried to look at Order By Field() but I do not seem to understand how I can go about this.
Table name is Property
Column name is AgentName
Select * from property
I could Either display every od record to be john and every even record to be ant or first 2 or 3 records to be john and then next 2 or 3 records to be ant's/
Any idea or help ?
Thanks
Hugo