Posted by Tom
2015-11-30
Hi,
>Sellers in DB - 50 persons | buyers in DB - 10 persons | Guests in DB - 5 persons
OK, so you want to display the number of records in each category ( rather than sorting )
You can execute sql statments in the template(web/staff/tpl.(table-name).search.inc.php)
( Of course, you need to know database programming in PHP, though )
>One field have cost entries, can i view sum of this entries,
Just add them up in web/staff/tpl.(table-name).search.inc.php. Here is a skeleton:
>Sellers in DB - 50 persons | buyers in DB - 10 persons | Guests in DB - 5 persons
OK, so you want to display the number of records in each category ( rather than sorting )
You can execute sql statments in the template(web/staff/tpl.(table-name).search.inc.php)
( Of course, you need to know database programming in PHP, though )
>One field have cost entries, can i view sum of this entries,
Just add them up in web/staff/tpl.(table-name).search.inc.php. Here is a skeleton:
// initilize total
$total = 0;
(loop begins)
// add each cost to the total
$total += $hm->Zb('rs:def:cost');
(loop ends)
// display total
echo $total;
Please can you tell me how can i sorting entries by categories and view it in page. For example. I have categories "seller", "buyer", "guests" and i want this entries viewing like:
Sellers in DB - 50 persons | buyers in DB - 10 persons | Guests in DB - 5 persons
and another quastion))
One field have cost entries, can i view sum of this entries, for example
I have field with this value: <?php echo $hm->Zb('rs:def:cost'); ?>
First entries in DB cost - $1
Second entries in DB cost - $0.5
Third entries in DB cost - $1
Fourth in DB
Fifth...
And on the top of the page i want place the total sum of value of this field (<?php echo $hm->Zb('rs:def:cost'); ?>.
For Example:
Total in DB: $2.5.
Sorry formy bad english. THANK YOU FOR FASTEST REPLY