I managed to get a some cool queries working but I want to know is there a way to query a field and add a secondary where clause.
Thanks
I managed to get a some cool queries working but I want to know is there a way to query a field and add a secondary where clause.
Thanks
You can add multiple Where clauses to the API Query function, but they are treated as AND statements, eg: array(‘FirstName’ => ‘Test’, ‘LastName’ => ‘Alpha’)
If you need to go to the level of having complex queries, it maybe a good idea to use the Saved Searches.
Otherwise, you will have to use the filtering in your code instead.
Thank you for your reply, I meant to write for the same field. I’m currently using saved searches but just wanted to know if there was a way to achieve complex queues with API
You can’t customize the query in complex ways via the api. You can only set the complex query as a saved search and then pull the results of those criteria when you need them. ie there is no real equivalent to sending a SQL statement.
Bummer! oh well thanks for your reply.
John is correct. However you can pull multiple queries then merge the arrays. Makes it more of a challenge