You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to check if a ROQL query has returned records in PHP

Accepted answer
25
Views
3
Comments
edited Feb 1, 2021 8:19PM in Customer Portal 3 comments

Content

I have the following query in my PHP custom script

$roql = "SELECT ID, LookupName  FROM Contact WHERE emails.address LIKE '".$email."'";
$result = RNCPHP\ROQL::query($roql)->next();

How can I check if $result has returned any records... some sort of a COUNT function?
Even if it doesnt find any records, $result is still not null, so i need a way to check for an empty result set

thanks

Version

19B

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!