since i'm new to mysql i'm using MS access as a mirror.
I basically created the EXACT same tables, relationships in MS access as in my mysql database.
In MS access i created this query:
SELECT Sum([MAIN]![DAY]+[MAIN]![NIGHT]) AS TOTALTIME, MODEL.MODEL
FROM MODEL INNER JOIN MAIN ON MODEL.MODEL_ID = MAIN.MODEL_ID
GROUP BY MODEL.MODEL, MAIN.PER_ID
HAVING (((MAIN.PER_ID)="5"));
I'm using php as the web interface for mysql database.
I noticed that MS access sql code is different that MYSQL.
What i'm having problem with is this line:
Sum([MAIN]![DAY]+[MAIN]![NIGHT]) AS TOTALTIME
I'm trying to add the SUM of DAY and the SUM of NIGHT.
I tried:
SELECT Sum(Sum(MAIN.DAY))+(Sum(MAIN.NIGHT)) AS TOTALTIME ...etc... but it didn't work
The rest of the sql code works fine works fine...
any ideas?
thanks
Noam