I have a table in mysql called drugs with 3 columns (id,illness,drug).
An illness may occur several times in the column but with different drug.
I need a code to select a distinct ilness but it should use a random criteria so that it can display different drug.
Example in mydb...
id | illness | drug
------------------------------
1 |malaria |panadol
2 |malaria |hedex
3 |malaria |tripple action
4 |fever |panadol
i tried this but it wasn't random in picking the rows for drug. selected only a single drug for malaria all the time.
$quotes="SELECT drug,remedy FROM drugs group by drug";
i need this outputs
1 | malaria | panadol or hedex or tripple action **//any but random**
2 | fever | panadol **//random drug if i add other rows of fever**