I have an ACCESS query that I am trying to convert to MySQL. See if you can help:
ACCESS Query-->
$query1 = odbc_exec($odbc1, "SELECT [CONCAT], IIF(Sum([LMU])>0,Format(100*Sum([LM])/Sum([LMU]),'000.0'),Format(100*0,'000.0')) AS [QUERY_LM] FROM [table1] WHERE [PLACE] LIKE '$place%' GROUP BY [CONCAT] ORDER BY [CONCAT] ASC") or die (odbc_errormsg());
Possible MySQL Query [d/NOT work??]-->
$query1 = "SELECT CONCAT, IF(SUM(LMU)>0,100*SUM(LM)/Sum(LMU),100*0) AS QUERY_LM FROM `table1` WHERE PLACE LIKE '$place%' GROUP BY CONCAT ORDER BY CONCAT ASC";
$result1 = mysql_query($query1) or die("Error. " . mysql_error());
As you may notice, I have not used the equivalent of FORMAT() in MySQL to simply this conversion, but it still doesn't work.
--Mailto