I just want to check and see if a row exists where the $lectureName shows. If a row does exist with the $lectureName somewhere in it, I want the function to return "ass
Use mysql_num_rows(), to check if rows are available or not
$result = mysql_query("SELECT * FROM preditors_assigned WHERE lecture_name='$lectureName' LIMIT 1"); $num_rows = mysql_num_rows($result); if ($num_rows > 0) { // do something } else { // do something else }