Get content type with PHP from database
To retrieve a Student node (in OO-lingo that would a Student instance), use node_load(). If you want to retrieve all Student nodes, you have to loop over the result of a database query like this

$results = db_query(db_rewrite_sql("SELECT nid FROM {node} WHERE type = 'student'"));
while($nid = db_result($results)) {
  $node = node_load($nid);
  // Do something with $node
}


If you have a lot of Student nodes, it's probably not a good idea to process all of them in a single run. If you really need to process all of them, you should use the Batch API.