Jump to content

AtkExpressionAttribute

From NusaATK
Revision as of 17:25, 19 December 2007 by bahtiar (talk | contribs)

Attribute: atkExpressionAttribute

API docs | Flags

List of other attributes

File:AtkExpressionAttribute.png
atkExpressionAttribute screenshot

example:

$this->add(new atkExpressionAttribute("employee_count", "SELECT COUNT(*) 
                                                         FROM employee_department ed
                                                         WHERE ed.department_id = [table].id"));

This gives you a nice overview of the number of employees in each department in the admin overview of the department node.

Any SQL expression can be used and you can reference the node's table using the [table] block.

Note: http://www.achievo.org/forum/viewtopic.php?t=2409&highlight=atkexpressionattribute