[resolved] How to set where in findRecords[URGENT] (2 posts)

  1. hava82
    Posted 3 years ago #

    Hi, I have added field 'related'. Now when I try to do something like $pods->findRecords('','','related='.get_the_ID()); I get mysql error. How to make search ? Thanks!

    PS. Sorry, have no time to read manual. Tried to read man but seems need more time then I have.

    [ don't bump ]

  2. Scott Kingsley Clark
    Posted 3 years ago #

    $pods->findRecords( 'id', -1, 'related_field_name_here.ID = ' . get_the_ID() );

    Change related_field_name_here to whatever the field name you have your relationship field set to.

    The first variable is for what to order by, the second is how many to return (1 or more, or you can set to -1 to return all), the third is for the 'where' parameter.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.