Using pick column in where
Can I use 2 levels of dot notation to filter a PICK column?
I have $monterias->findRecords('t.name',-1,'mancha.coto.id=1')
This raises the error a Unknown column 'mancha.coto.id' in 'where clause' et
I've used the magic tag {@mancha.coto.name} sucessfully elsewhere on the site.
Thanks
2 Answers
Not in findRecords (yet), possibly in Pods 2.1 - you can only use it in the magic_tag or in a $record->get_field('mancha.coto.forever.ever.name')
ok, then what would be a got example of the sql to use so that we can get to that second level pick and obtain data from it.. this is very important to my project as well.. stepping through in php to get the information seems a little in-efficient.. I suppose the next best thing would be to setup another pick list from the bottom nested pod to the top most parent so that it is available.. I am not sure about performance with this option either.. –
leeburstroghm
Jul 18 '11 at 6:26
Try adding additional joins on the relationships. Follow $record->sql to see how Pods is setting up it's own JOINs originally, then add your own to the $params in findRecords. –
sc0ttkclark
Jul 24 '11 at 9:18
enter at least 15 characters
Ok, that's clear thanks


