Look at the quipQHook snippet used on the
quip demo. You can download the queryHook snippet examples from the
documentation page.
Quip table is a joined table for the site_content table too.
$joined = array(
array(
'package' => 'quip',
'class' => 'quipComment',
'packagePath' => '{core_path}components/quip/model/',
'fields' => 'author , body , createdon ', // displayed fields
'withFields' => 'body', // search only in body field
'where' => array( // where clause is primordial to avoid to search inside unapproved comments
'((`quipComment`.`deleted` IS NULL) OR (`quipComment`.`deleted` = 0))',
'((`quipComment`.`approved` IS NULL) OR (`quipComment`.`approved` = 1))'
),
'joinCriteria' => 'quipComment.resource = modResource.id'
)
);
EDIT:
if jhwp is the class name, you should try :
$joined = array(
array(
'package' => 'JHWproducts',
'class' => 'jhwp',
'packagePath' => '{core_path}components/JHWproducts/model/',
'fields' => 'content',
'withFields' => 'content',
'joinCriteria' => '
jhwp.docid = modResource.id'
)
);
[ed. note: coroico last edited this post 12 years, 7 months ago.]