Hi David
I am trying to show the total number of records per feed using $total as per http://www.pricetapestry.com/node/4956 in the demo script below. I got it to work but the script will only show the same record details for each record in the feed.
Could you take a look please.
Chris
{code saved}
Hi Chris,
It looks like it's just the $total count code missing from the record handler function - where you currently have:
function myRecordHandler($r)
{
global $count;
global $page;
global $record;
$count++;
$record = $r;
return ($count == $page);
}
...REPLACE with:
$showTotal = TRUE;
function myRecordHandler($r)
{
global $showTotal;
global $total;
global $count;
global $page;
global $record;
$count++;
$total++;
if ($count==$page)
{
$record = $r;
}
if (!$showTotal) return ($count == $page);
}
(I notice your code already check $showTotal elsewhere, so that should be all it is...)
Cheers,
David
--
MagicParser.com