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:
$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
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