Is there an easier / less resource intensive way to accomplish this? (studentid is the key to this table, not name).Code:Public Function NameIsOnFile($studentname) { $sql = "SELECT COUNT(*) FROM studentlist WHERE name = '{$studentname}'"; $result = mysql_query($sql); $row = mysql_fetch_array($result, MYSQL_NUM); if($row[0] > 0) { // student name is on file return true; } return false; } // end function
I've done a search in this forum, but must not be using the right keywords.
Regards,
grNadpa



Reply With Quote






Bookmarks