hi to all,
this might be very simple, but i don;t know how to get correct output, someone help me to complete it...
1st i need to get result from this query
$sql="SELECT * FROM $tbl1_name WHERE sex='$show_all'";
$result=mysql_query($sql);
this'll result either all the boys or all the girls;
from the above result again i need select according to their age using this 2nd query.
$sql="SELECT * FROM $tbl1_name WHERE age BETWEEN '$from' AND '$to'";
$result=mysql_query($sql);
Help me to do this in single subquery...
Thanx in advance...