&where=`{"ResourceGroupResources.document_group":"3"`
sorry, I missed a '}'
should be:
&where=`{"ResourceGroupResources.document_group":"3"}`
-
☆ A M B ☆
- 24,524 Posts
Ah. And with my bad eyes, even if I did know where those were supposed to go, I just don't see them - or not, as the case may be.
Works perfectly. And no fussing with PHP code. MIGx never ceases to amaze me.
-
☆ A M B ☆
- 24,524 Posts
Ah. And with my bad eyes, even if I did know where those were supposed to go, I just don't see them - or not, as the case may be.
Works perfectly. And no fussing with PHP code. MIGx never ceases to amaze me.
for not in group you can try this:
<ul>
[[migxLoopCollection?
&classname = `modResource`
&joins=`[{"alias":"ResourceGroupResources","on":"ResourceGroupResources.document_group=1 and ResourceGroupResources.document=modResource.id"}]`
&where=`{"ResourceGroupResources.document_group":null}`
&tpl=`@CODE:<li>[[+pagetitle]]([[+id]])</li>`
]]
</ul>
-
☆ A M B ☆
- 24,524 Posts
That works to find resources not in any group. But how would you indicate a "not" in that where clause?
this should work for selecting all resources which are not in group 1
change the group-id in this here:
on":"ResourceGroupResources.document_group=3
-
☆ A M B ☆
- 24,524 Posts
{edited} Never mind; this was 2.3.2 and I upgraded to 2.5.2 and all is well.
Very strange. On localhost during development, the migx snippet works as expected. But used on a remote server, while it does display the list of resources not in a group, it starts out with a printout of the actual query. I can't imagine why it's doing that, it's exactly the same snippet call as posted above.
[ed. note: sottwell last edited this post 13 years, 2 months ago.]
discuss.answer
I'm going to guess that either it's some leftover debugging code of Bruno's, or more likely, you put that in there to debug something a while ago and forgot about it.
I've been there in both cases.