This question already has an answer here:
I get this error every time I run the code, I tried going through other similar threads but it didn't help. I am newbie
$count=3;
$db = new mysqli ('localhost', 'root', '', 'test');
$selectSQL='SELECT * FROM coll_mark WHERE univ="'.$_POST['univ'].'" AND '.$brachTxt.'<="'.$_POST['perc'].'"AND '.$brachTxt.'!="" ORDER BY '.$brachTxt.' DESC LIMIT '.$count;
$queryset='';
$queryset=mysql_query($selectSQL);
while($row = mysql_fetch_assoc($queryset))
{
echo('<tr><td id="ColgNames">'.$row['name'].'</td><td align="center">'.$row[$brachTxt].'</td></tr>');
}
I also checked whether the query structure is correct or not, but the query is working perfectly.
</div>