Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selecting differnt results from the same table.

Status
Not open for further replies.

DataHugger

Programmer
May 26, 2004
38
0
0
US
Greetings,

I have am using mysql.

I wish to select from a table x number of result that match the same criteria then continue select that same x number that match the same criteria but differnt from the first criteria.

example table.

x = 2
medicine type
asprin I
tylenol I
advil II
creatin III
salvation R
Redemption R
painkiller I

results would look like

asprin I
tylenol I
advil II
creatin III
Salvation R
Remdemption R

It needs to go through the table selecting up to X and then continue on to the next possible value.

Does anyone have any suggestions?

-DaTaHuGGeR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top