hi i have the following sql statement....
going via odbc to access....
$sql = "SELECT Clients.ClientID, CFName, CAddress2, CPostcode, SUM(('Rent Agreed' + 'Balance brought forward')-(Repairs + Furniture + Other)) as TOTALGROSS FROM Clients, Statement GROUP BY Clients.ClientID, CFName, CAddress2, CPostcode";
lets say i have one client who has five statements in the specified period that i want.
the above should return one row with that clients details from the clients table and then sum the final amount based on the above calculation but should return the sum of the five statements. at the moment this is not the case. in addition i am getting the following error ....
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression., SQL state 22005 in SQLExecDirect in c:\program files\apache group\apache\htdocs\~\lh.php on line 32
Error in odbc_exec( no cursor returned )
i dont know what this means can someone please explain???
thanks