I have a custom pod, product_type
, in that pod I have a custom field named label
. I want to find all the pods where the label
matches a certain strings.
Iv been trying this (and some other variations):
$mypod = pods('product_type', array(
'where' => 'product_type.label LIKE "%'.$someLabelString.'%"',
'limit'=>-1
));
I've also tried changing the product_type.label
part of the query to t.label
, but to no avail. I get this error:
Database Error; SQL: SELECT DISTINCT `t`.* FROM `wp_posts` AS `t` WHERE ( ( `product_type`.`label` LIKE "%hello%" ) AND ( `t`.`post_type` = "product_type" ) AND ( `t`.`post_status` IN ( "publish" ) ) ) ORDER BY `t`.`menu_order`, `t`.`post_title`, `t`.`post_date`; Response: Unknown column 'product_type.label' in 'where clause'