Adding values together

QuestionsAdding values together
Rheal asked 8 years ago

Hello

I have a query that brings back some numbers. ie: ICSS_TIME, SPAR_TIME
I want to create a column that will add those values together.

4 Answers
Abu Ghufran answered 8 years ago

You can do this addition in SQL query and map it on grid column.
$g->select_command = "select f1,f2,sum(f1,f2) as f3 … from table";

Rheal answered 8 years ago

Can I have more then one select query in a Grid?

Abu Ghufran answered 8 years ago

You can have one for select and one for count.
This is internally set, however you can also set: e.g. (c alias is required)

$g->select_count = "SELECT count(*) as c from table";

If you tell exact tell scenario, i can suggest better.

Rheal answered 8 years ago

Ok..Thank You ..I got it 🙂

Your Answer

11 + 19 =

Login with your Social Id:

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?