Answer the question
In order to leave comments, you need to log in
Passing a numeric value (int) to the snippet. How?
Good afternoon!
There is a chunk with content (wayfinder output):
and there is a snippet:
$sql = "SELECT * FROM {$modx->getTableName('modResource')} WHERE parent = $parent";
$q = $modx->prepare($sql);
$q->execute(array(0));
$arr = $q->fetchAll(PDO::FETCH_ASSOC);
echo count($arr);
Answer the question
In order to leave comments, you need to log in
Everyone, back off. Wayfinder gives out a kind of crooked ID. How exactly, too lazy to understand.
In general, you have to give
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question