WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How to set where in findRecords[URGENT]

[Resolved] How to set where in findRecords[URGENT]

  • 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 ]

Viewing 1 replies (of 1 total)
  • $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.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] How to set where in findRecords[URGENT]’ is closed to new replies.
Skip to toolbar