Re: [Jason] Displaying new listings only
Hi Jason
Thanks for your help.
I am not sure where the code you supplied should go. I have created a page called listings_date.php and have put the code at the top just after the "STEP 1: LOAD RECORDS..." code as follows:-
<?php
require_once "init.php";
list($listingRecords, $listingDetails) = getRecords(array(
'tableName' => 'listings',
'joinTable' => 'homepages',
'perPage' => '10',
));
$thirtyDaysAgo = date("Y-m-d", strtotime("-1 days", strtotime(date("Y-m-d"))));
list($recentListingsRecords, $recentListingsMetaData) = getRecords(array(
'tableName' => 'listings',
'allowSearch' => false,
'where' => "createdDate >= '$thirtyDaysAgo' OR updatedDate >= '$thirtyDaysAgo'",
));
?>
<?php include "include_header.php"; ?>
Is this correct? (the only change I made was that I change the -30 to -1 to show changes in the last day. When I display this page it still shows all the records.
Hope you can point me in the right direction.
Thanks again for your help.
Andy