Hi,
The global above is doing:
Find links that are isValidated => Yes, and isNew => Yes (in the Links table)
AND then also the Review_Validated => Yes in the "Reviews" table
However, I doubt thats what you are after ;)
If you wanna get say the latest reviews added, you could try changing:
$sth = $search_db->select ( { isValidated => "Yes" } , { isNew => "Yes" } , { Review_Validated => 'Yes' });
..to simply:
$sth = $search_db->select ( { isValidated => "Yes" } , { Review_Validated => 'Yes' });
To find the total number of new reviews in a set period, try something like:
get_latest_review_count
Code:
sub {
my $_x_days_ago = GT::Date::date_sub(GT::Date::date_get(),7);
my $total = $DB->table('Links','Reviews')->count ( { isValidated => "Yes" } , GT::SQL::Condition->new('Review_Validated','=','Yes','Review_Date','>=',$_x_days_ago) );
return $total || 0;
}
This will get the total number of reviews, over the last 7 days.
Untested, but should work
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package | GLinks ULTRA Package PRO Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins!