How to put sum(price) from detail table in Master table field.
this is the sql that I wrote.
select `groupID`,
`OnsiteID`,
`Attendee`,
`Type`,
`Payee`,
`church`,
(select sum(price) from _onsite_order_detail where groupID = _onsite_group.groupID) as `subtotal`
From `_onsite_group`
I can see the results from master table, but now I cant go into the detail table except from the jump menu.
ERROR
____
__-
PHP error happened
Technical information
Error type
256
Error description
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and (`OnsiteID`=241)' at line 1
URL
www.c2dinc.com/nbca/backend/_onsite_group_list.php?mastertable=%5Fonsite%5Forders&masterkey1=241
Error file
/home/c2dinc/public_html/nbca/backend/include/dbconnection.php
Error line
26
SQL query
select `groupID`, `OnsiteID`, `Attendee`, `Type`, `Payee`, `church`, (select sum(price) from _onsite_order_detail where (groupID = _onsite_group.groupID) as `subtotal` From `_onsite_group`) and (`OnsiteID`=241)
Solution
This is a general error. It occurs when thereis an error in event code or in SQL.
Send your SQL or event code along with full error message tosupport@xlinesoft.com.