display count field from other table in a list |
6/20/2011 05:20:33 | |
| PHPRunner General questions | ||
|
M
muzzoshah author
hi everyone, |
||
|
C
|
cgphp 6/20/2011 |
|
muzzoshah, |
|
|
M
|
muzzoshah author 6/20/2011 |
|
Thanks cgphp, muzzoshah, you have to add two fields to the SQL SELECT in the query of table A and make them to appear only in the list page. Then, set them as custom field to retrieve the total values from the table B. Cheers CGphp |
|
|
C
|
cgphp 6/21/2011 |
|
Custom fields are in Table_A. Right ? $sql = "select count(id) as c from `t_Table B` where DeptID=".$data['DeptID'];
|
|