Last active
February 24, 2025 02:20
-
-
Save 4e6ka/3187eb974d8c265f3fcde28ae68d7fc2 to your computer and use it in GitHub Desktop.
Выборки modx json для where в pdoResources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Формат записи фильтров в pdoResources — чистый JSONxPDO, т.к. для этого используется JSONxPDO-параметр &where: | |
Проверка по типу документа | |
&where=`{"class_key":"modDocument"}` | |
rtfm.modx.com/display/xPDO20/xPDOQuery.where | |
`{«tv1»:«5»}` | |
`{«tv1:=»:«5»}` | |
`{«tv1:!=»:«5»}` | |
`{«tv1:>»:«5»}` | |
`{«tv1:>=»:«5»}` | |
`{«tv1:<»:«5»}` | |
`{«tv1:<=»:«5»}` | |
`{«tv1:LIKE»:"%5%"}` | |
`{«tv1:NOT LIKE»:"%5%"}` | |
`{«tv1:LIKE»:"%5%", «OR:tv2»:«8»}` | |
`{«tv:IN»:[7,8,9,10]}` | |
`{«tv:NOT IN»:[7,8,9,10]}` | |
`{«tv1:IS»:null}` // null — в нижнем регистре | |
`{«tv1:>=»:«5», «AND:tv2»:«8»}` | |
`{«tv1:<»:«5», «OR:tv2:LIKE»:"%58"}` | |
`{«tv1:!=»:«5», «OR:tv2:NOT LIKE»:"%8%"}` | |
`{«tv1:LIKE»:"%5%", «OR:tv2:!=»:«8»}` | |
`{«tv1:LIKE»:"%5%", «OR:tv2:<»:«8»}` | |
`{«tv1:LIKE»:"%5%", «AND:tv2:<»:«8», «OR:tv3:<»:«9»}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment