Hi
I have a PHP script which parces a mySQL table and shows which
sections meet on which day by using an array containing (mon,...Fri)
and another lisitng sections. I then have the PHP do to selecrt
statements on to list those sections that are mixed and those that are
not.
I have a title "Open to Boys and Girls" then it cycles through the
applicable groups. I want to hide this title if there are no group
from the mysql search but can't figure out how as the actual varaible
$result is set once the search is done even if it pulls nothing back
Code is below, does anyone have any ideas?
CODE
-------------------------------------------
$result = @mysql_query("S ELECT Group_Name FROM `groups` where
".$section."_co mment like '%".$day."%' and ".$section."_co mment like
'%mixed%'");
echo "<u>Open to Boys & Girls</u></br>";
while($row = mysql_fetch_arr ay( $result )) {
$Group_Name = $row['Group_Name'];
echo "• ".$Group_Name." </br>";
}// end Group Name loop mixed
Regards
Richard
I have a PHP script which parces a mySQL table and shows which
sections meet on which day by using an array containing (mon,...Fri)
and another lisitng sections. I then have the PHP do to selecrt
statements on to list those sections that are mixed and those that are
not.
I have a title "Open to Boys and Girls" then it cycles through the
applicable groups. I want to hide this title if there are no group
from the mysql search but can't figure out how as the actual varaible
$result is set once the search is done even if it pulls nothing back
Code is below, does anyone have any ideas?
CODE
-------------------------------------------
$result = @mysql_query("S ELECT Group_Name FROM `groups` where
".$section."_co mment like '%".$day."%' and ".$section."_co mment like
'%mixed%'");
echo "<u>Open to Boys & Girls</u></br>";
while($row = mysql_fetch_arr ay( $result )) {
$Group_Name = $row['Group_Name'];
echo "• ".$Group_Name." </br>";
}// end Group Name loop mixed
Regards
Richard
Comment