Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

help query from form input variable
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: help query from form input variable
#32507
Re:help query from form input variable 11 Years, 7 Months ago Karma: 0
hi,
the collumn i want to add is to summarize the total value from other collumns, its like :

col_1 col_2 col_3 col_total
2 2 2 6

its something like that, where col_1-3 is generated from mysql and the col_total is the collumn i want to add to that table.

thanks again,
Mo.
The administrator has disabled public write access.
 
#32509
Re:help query from form input variable 11 Years, 7 Months ago Karma: 748
If you show data from a database, it is more simple way to calculate value of the column in SQL query. SQL query will look like:

Code:


SELECT
 col1,
 col2,
 col3,
 (col1 + col2 + col3) AS Total
FROM
 tbl



Regards,
ARI Soft
The administrator has disabled public write access.
 
#32511
Re:help query from form input variable 11 Years, 7 Months ago Karma: 0
did you mean i put that query after my first one?
and how i associate the query result to the column andor how to add the collumn

sorry for sucha noob question
thanks again,
Mo.
The administrator has disabled public write access.
 
#32513
Re:help query from form input variable 11 Years, 7 Months ago Karma: 748
Could you provide your SQL query and specify what columns do you want to calculate?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#32520
Re:help query from form input variable 11 Years, 7 Months ago Karma: 0
hi admin,

sorry for late reply.

my sql query is
Code:

Select * from hsnjz_chronoforms_data_peserta where bulan = {$REQUEST:bulan} AND tahun = {$REQUEST:tahun}


i'm hiding some unneeded field and the result is this table


on the image above, the red border is some collumn and row i need to add.
the "sub total" column will contain "x" value wich is the sum from column 1 to 7
the "%" column will contain "z" value wich is the percentage of "sub total" compared to "a" column
and on the last row i need to add total which "y" is the sum from all row above on that collumn.

thanks for your help
regards,
Mo.
The administrator has disabled public write access.
 
#32531
Re:help query from form input variable 11 Years, 7 Months ago Karma: 748
Could you send SQL dump of hsnjz_chronoforms_data_peserta table with sample data by email because it is not clear what columns the table contains?

PS: The extension doesn't support ability to create total column (the last row in your sample).

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 123