Load all node titles with db_query()
$result = db_query_range("SELECT title FROM {node} WHERE type = '%s'", $content_type, 0, 20);
$titles = array();
while ($row = db_fetch_object($result)) {
  $titles[] = $row-&gt;title;
}


http://api.drupal.org/api/drupal/includes--database.inc/group/database/6