Uhm.. How about;
$result = mysql_query('db', "SELECT url FROM table WHERE id=something");
Header("Location: ". mysql_result($result, 0, 0));
Assuming you don't need any sanity-checks etc.. :> you could ofcourse do $var = mysql_result($result, 0, 0); and do whatever you want to that variable,. and then Header("Location: $var"); .. 🙂