how can i use while loop inside the select query
Posted: Thu Jul 09, 2009 2:07 am
hai everyone can u know how can i use while loop inside the select query.
my query are like
$sql3="SELECT University,
SUM(IF(Course = '$s1',1,0)) AS `s1`
FROM registeredstudenttb where Instid='$Sname'
GROUP BY University";
Here $s1 having multiple values.
i want result like
University | Courses |Total
Doeacc No of Student Total
MCRP No Of Student Total
regards,
my query are like
$sql3="SELECT University,
SUM(IF(Course = '$s1',1,0)) AS `s1`
FROM registeredstudenttb where Instid='$Sname'
GROUP BY University";
Here $s1 having multiple values.
i want result like
University | Courses |Total
Doeacc No of Student Total
MCRP No Of Student Total
regards,