Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Review.cgi -> Links SQL - Table Select Prob.

Quote Reply
Review.cgi -> Links SQL - Table Select Prob.
Okay...I have most of Widgetz's (jerrysu) Review.cgi working. The only problem I am experiencing is pulling values from the Users where I have Email Address and other information pertinent to the reviews stored.

I have added the following codes in sub show_review:

Code:

$sth = $DB->prepare ("SELECT * FROM User_Reviews WHERE LinkID = $id AND Review != '' AND UserID !='' ORDER BY ID Desc LIMIT $OUT{start}, $LINKS{reviews_per_page}");
$sth->execute() or die $DBI::errstr;
while (my $rev = $sth->fetchrow_hashref) {
my $stj = $DB->prepare ("SELECT COUNT(ID), AVG(SiteRating) FROM User_Reviews WHERE UserID = '${$rev}{UserID}'");
$stj->execute() or die $DBI::errstr;
(${$rev}{USER_Total}, ${$rev}{USER_Average}) = $stj->fetchrow_array;
my $stk = $DB->prepare ("SELECT * FROM Users WHERE '${$rev}{UserID}'");
$stk->execute() or die $DBI::errstr;
$stk->fetchrow_array;
$OUT{reviews} .= &site_html_review ($rev, $dynamic);
$OUT{finish}++;
}


The only text that is printed includes Review Title, Review, and Site Rating. User information is not pulled or printed. I've been working on this for two days now (about 6 hours) and I can't get it to work.

Any suggestions would be greatly appreciated.

Thanks in advance.

Regards,

Eliot Lee

Subject Author Views Date
Thread Review.cgi -> Links SQL - Table Select Prob. Stealth 2811 Aug 24, 2000, 9:25 PM
Thread Re: Review.cgi -> Links SQL - Table Select Prob.
jsu 2679 Aug 25, 2000, 10:05 PM
Post Re: Review.cgi -> Links SQL - Table Select Prob.
Stealth 2705 Aug 25, 2000, 10:08 PM
Thread Re: Review.cgi -> Links SQL - Table Select Prob.
Stealth 2684 Aug 25, 2000, 11:05 PM
Thread Re: Review.cgi -> Links SQL - Table Select Prob.
jsu 2645 Sep 17, 2000, 5:37 PM
Post Re: Review.cgi -> Links SQL - Table Select Prob.
Stealth 2669 Sep 17, 2000, 5:40 PM