bit confused here with what’s wrong with my query. I have about 9 records and am trying to get all this 9 records from MySQL database. The weird thing happening is only 2 of the records are coming out and I really don’t understand what’s going on as my query seems to be Ok.
$mQ = "SELECT * FROM group_elective_modules
WHERE group_elective_modules.yr = '4'
AND
group_elective_modules.courseName = 'BSCSHCSSEntrepreneurship' ";
$mR = mysql_query($mQ);
while ($ROW = mysql_fetch_array($mR)) {
echo $ROW['moduleID'] . " ". $ROW['yr'] . "<BR />";
}
Here’s the table 
Any help would be appreciated as I don’t understand what’s going on with this query. Thanks in advance.
Look if there are spaces in the entries, so you could trim before with TRIM(var) = ‘value_without_spaces’
FYI, No need to put “group_elective_modules.” appendix in yr and courseName vars