I'm trying to use pdoUsers to generate an alphabetic list of users, using AJAX to run a pdoUsers snippet when a button is clicked. I don't seem to be able to figure out if it's even possible, or how to set the &where to be something like
&where=`username LIKE '%A' OR username LIKE '%a'`
<sigh> Maybe if I didn't get it backwards, and tried A% and a%...
Well, that doesn't seem to make a difference. Odd...it only shows a few users that start with 'a', and throws in a few that don't for good measure.
Ok, now I see what it's doing. It's just displaying unfiltered users, with a default limit set.
Got it! Thanks to a post by romain, I tried this and it works!
[[!pdoUsers? &tpl=`userListTpl` &where=`{"username:LIKE":"a%"}` &limit=`0`]]
[ed. note: sottwell last edited this post 10 years, 6 months ago.]