How to totalize a column and display it in the header section of the page

QuestionsHow to totalize a column and display it in the header section of the page
Tony Wolsey asked 4 weeks ago

Hello

I am sure this is a simple task but I am struggling to make it work. Is there a simple way to totalize a mysql column and display it in the header section of the page?

$result = $g->execute_query(“SELECT SUM(quantity) as s FROM tblestimate where projectnumberest = ‘110902618’”);

thank you

Tony

2 Answers
Abu Ghufran Staff answered 3 weeks ago

You can call:

$rs = $g->get_one(“SELECT SUM(quantity) as s FROM tblestimate where projectnumberest = ‘110902618’”);
$opt[“caption”] = “Sample Grid – “. $rs[“s”];

where $g is new jqgrid() and $opt is variable passed to set_options($opt)

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Tony Wolsey answered 3 weeks ago

thank you Abu

Your Answer

5 + 2 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!