Get content type with PHP from database I have created a content Type Student, I have imported the list of student with node import. Now I want to get the name, location and other values of the content type Student from my database. How can I do that with PHP? I have already created a simple module with a menu and block.
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.