I have a mysql table and I am querying it through PHP. The query is like below
SELECT min(Age) , max(Age) , min(Workexp) , max(Workexp) FROM data_table
Depending on user's choice, it may have to return more or less min/max pairs but it will always return 1 row only.
Had the number of columns been constant, I could have simply used below to store the results in an array and use it.
$result=mysql_query($sql);
while ($obj = mysql_fetch_object($result))
{$SelFieldNameArray[] = array('field_name1' => $obj->field_name1, 'field_name2' => $obj->field_name2);}
However because of variable number of columns, I am not able to do this here. Could anyone please help me regarding this. Thank you.