This topic is locked
[SOLVED]

 Totals question

8/16/2012 8:09:14 AM
PHPRunner General questions
M
macskafogo author

Hello !


Please help !
MARADEK= INDULO-SUM(VALTOZAS)
Mastertable Name: keretek

Masterkey: PKUP
Detailtable Name: keretadatok
How??
Thanks.

C
cgphp 8/16/2012

A LEFT JOIN should you get what you want. You have to join the master and detail table in the Query tab:

SELECT *,

INDULO - SUM(detail_table.VALTOZAS) as MARADEK

FROM

master_table

LEFT JOIN detail_table ON (master_table.id = detail_table.id)

GROUP BY master_table.id
M
macskafogo author 8/17/2012



A LEFT JOIN should you get what you want. You have to join the master and detail table in the Query tab:

SELECT *,

INDULO - SUM(detail_table.VALTOZAS) as MARADEK

FROM

master_table

LEFT JOIN detail_table ON (master_table.id = detail_table.id)

GROUP BY master_table.id



You are the best !
Thank You !!