I am using Community Builder for subscription management and initial registration but using Fabrik to collect and display user profile information. I am looking for a way to display Fabrik collected user profile information under a tab in the Community Builder user profile page.
Community Builder has a field type called "Code" that allows the insertion of any php and it will render it. I tested it with several different sets of standard php code (such as difference between 2 dates) and it worked. But when I tried to display the detail information for a single Fabrik record, based on the Fabrik Wiki documentation for Load a single ROW of data as an object, the result is blank.
My Fabrik database table is #__fab_host_profile
As a test I tried the following code to try and pull detail view data for user id 540:
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select(array('hostregion', 'hostshichousonjpn','hostactivities'))
->from('#__fab_host_profile')
->where('user_id = ' . $myDb->quote('540'));
$myDb->setQuery($myQuery);
$row = $myDb->LoadObject();
Result was blank.
Then, as another test, I tried (just to display a single field's value):
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select('hostshichousonjpn')
->from('#__fab_host_profile')
->where('user_id = ' . $myDb->quote('540'));
$myDb->setQuery($myQuery);
$hostshichousonjpn = $myDb->loadResult();
Result is still blank.
Can someone tell me what I am missing or direct me to a good example to accomplish my goal?
Community Builder has a field type called "Code" that allows the insertion of any php and it will render it. I tested it with several different sets of standard php code (such as difference between 2 dates) and it worked. But when I tried to display the detail information for a single Fabrik record, based on the Fabrik Wiki documentation for Load a single ROW of data as an object, the result is blank.
My Fabrik database table is #__fab_host_profile
As a test I tried the following code to try and pull detail view data for user id 540:
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select(array('hostregion', 'hostshichousonjpn','hostactivities'))
->from('#__fab_host_profile')
->where('user_id = ' . $myDb->quote('540'));
$myDb->setQuery($myQuery);
$row = $myDb->LoadObject();
Result was blank.
Then, as another test, I tried (just to display a single field's value):
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select('hostshichousonjpn')
->from('#__fab_host_profile')
->where('user_id = ' . $myDb->quote('540'));
$myDb->setQuery($myQuery);
$hostshichousonjpn = $myDb->loadResult();
Result is still blank.
Can someone tell me what I am missing or direct me to a good example to accomplish my goal?