selecting from database and consctruct URL for node
$result = db_query("SELECT * FROM {table_name}");
while ($row = db_fetch_array($result)) {
// do something like drupal_set_message(var_dump($row));
}
$nurl = 'node/' . 1235;
$url_p=drupal_get_path_alias($nurl);