Topic by Alexander Berndt
I'm trying to follow the section titled "Returning individual columns from a custom object" of this guide:
http://documentation.custhelp.com/euf/assets/devdocs/august2015/Connect_PHP/Default.htm
I have a custom object which looks like this:
I realise I can probably easily get the ID by adjusting the query but I'd rather try and fetch the ID from the results of the existing query as per the documented example.
$roql_result_set = RNCPHP\ROQL::query("SELECT * FROM CSSUser.CSSProfile WHERE CSSUser.CSSProfile.UserID = $userID")->next(); $id = 0; echo("<script>console.log('$id');</script>"); while ($roql = $roql_result_set->next()){ $id = $roql->ID; echo("<script>console.log('Test');</script>"); echo("<script>console.log('$roql->ID');</script>"); echo("<script>console.log('$id');</script>"); }
Unfotunately this only grabs an empty string for $id as the console outputs in the following order:
0
Test
(an empty string)
(an empty string)