D
D
Denis T2021-04-07 22:59:51
MODX
Denis T, 2021-04-07 22:59:51

Why is Pdoresource handling the where condition incorrectly?

Hello!
Straight to the point. Snippet code:

<?php
$where = array(
    'Lo:>=' => 100,
    'Lo:<=' => 140,
);

$where = $modx->toJSON($where);

$output = $modx->runSnippet('pdoResources',array(
    'limit' => 15,
    'parents' => 71,
    'includeTVs' => 'Lo',
    'where' => $where,
    'return' => 'json'
));

return $output;


This snippet produces a result of 4 values, that is, it works correctly. When I change 100 to 99, the result of the snippet is an empty array. Interestingly, when I change 99 to 10, the snippet works correctly.

I don't understand what magic is going on. Help me to understand.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question