Filter pods relationship like Header Detail on where clause using find()

Posted: November 14, 2013 in web

Note: the price is a custom field on the detail pod.

$temp = pods('header');
$params = array( 'limit' => 7, 'where'=>'detail.price.meta_value = 23');
$temp->find($params);
while ($temp->fetch()) {
 echo $temp->id();
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s