Skip to main content
Topic: How to query Count Components filtered to Current View Record? (Read 1508 times) previous topic - next topic

How to query Count Components filtered to Current View Record?

Hello everyone,

I've tried to construct a SQL query for the COUNT COMPONENT to limit records to the current record VIEW.  But to no avail.  Please help.

current view:
purchases/view    primary field='pur_id'

sql for the count component:
"SELECT COUNT(*) AS num FROM purchase_details WHERE pur_id=?"   

parameter:
$data['pur_id']
Not working.