Hello,
I wrote a query to see how many contacts we have in our system and compared it to what our main site says to see if it was accurate but there are some inconsistencies. Here is the query for all contacts:
$dated = (string) date(“Y-m-d”);
$query = array(“LastUpdated” => “~<~ “.$dated.” 00:00:00”);
$contact = $infusionsoft->data()->count($table, $query);
echo json_encode($contact);
This returns about 16,000 when our site says we have about 13,000. I was wondering if some of these aren’t contacts or if the query wasn’t written properly. Additionally, I wrote a query to try to get how many contacts were lastupdated in a month and it is also returning a large amount of records. Here is the query:
$query = array(
“LastUpdated” => “~<~ “.$date->format(‘Y-m-d’).” 00:00:00”,
“LastUpdated” => “~>~ “.$end->format(‘Y-m-d’).” 00:00:00”,
);
Where $date->format looks like (“2018-03-31”) and $end->format looks like (“2018-03-01”). Infusionsoft has something like this:
Which is what I am looking to do.
Any help would be appreciated, thank you!