$sql="select *, (select Faculty from userinfo where Faculty=$college) as category from award where HonoringYear=$year"; $rs=mysql_query($sql); return $rs;
Replace line 2 with:
$rs = mysql_query($sql) or die(mysql_error());
It could be a problem with the sub-select, but hard to diagnose without any sample data.
Also single quotes around $year
AS category FROM award WHERE HonoringYear='$year'";
(also, makes easier reading if you capitalise )
... and also add single quotes to this line;
..select Faculty from userinfo where Faculty='$college'
We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.