public static function getObjectIds($objectType, $begin = null, $end = null)
    {
        global $PPHP;
        $db = $PPHP['db'];

        $q = $db->query("SELECT DISTINCT(objectId) FROM transactions WHERE objectType=?", $objectType);
        if ($begin !== null && $end !== null) {
            $q->and("timestamp BETWEEN date(?) AND date(?, '+1 day')", array($begin, $end));
        } elseif ($begin !== null) {
            $q->and("timestamp >= date(?)", $begin);
        } elseif ($end !== null) {
            $q->and("timestamp <= date(?, '+1 day')", $end);
        };
        $q->order_by('objectId ASC');

        return $db->selectList($q);
    }