Author Info

$sql = "SELECT pv.uid,
(SELECT value FROM profile_values WHERE uid = pv.uid AND fid = 1) AS fname,
(SELECT value FROM profile_values WHERE uid = pv.uid AND fid = 2) AS lname,
(SELECT value FROM profile_values WHERE uid = pv.uid AND fid = 3) AS website
FROM profile_values AS pv WHERE pv.uid = %d";

$result = db_query($sql,arg(1));
while ($data = db_fetch_object($result))
{
$strFName =$data->fname;
$strLName =$data->lname;
$authorid = $data->uid;
$website = $data->website;
}
$authinfo = "\n

$strFName $strLName

";
if ($website "") {
$authinfo .= "\nWeb Site: $website
";
}
$authinfo .= "\nAuthor Profile
";
$authinfo .= "\nRSS Feed";
echo $authinfo;
?>