We solved it here, There was a problem in the query, we removed the "t1" at the 'group by' section. The problem was really a sintax error in the code not in the server.
Thanks, Douglas 2007/7/19, Michael Dykman <[EMAIL PROTECTED]>:
instead of leaving it in PHP, please print out your fully formatted query so we can see excatly what PHP is sending to MySQL: instead of : $qr = mysql_query("Select Distinct t1.RemaEstacao as et, t1.RemaData as dt, max(t1.Remahora) as mx from cadRema as t1, cadEstacoes as t2 where t1.RemaData = '".$qdata."' and t1.RemaEstacao = t2.EstCodigo group by t1.et order by mx DESC ,t1.RemaEstacao "); try : $myquery = "Select Distinct t1.RemaEstacao as et, t1.RemaData as dt, max(t1.Remahora) as mx from cadRema as t1, cadEstacoes as t2 where t1.RemaData = '".$qdata."' and t1.RemaEstacao = t2.EstCodigo group by t1.et order by mx DESC ,t1.RemaEstacao "; echo $myquery; mysql_query($myquery); by the symptoms you describe along with the little investigation we did yesterday, it appears your problem is somewhere in that string. - michael On 7/18/07, Douglas Araujo <[EMAIL PROTECTED]> wrote: > Hello everydoby, > > I'm having a problem executing a query in the MySQL server version 4.1, the > same query works fine in my other server with MySQL version 4.0. > > My PHP code is attached, and the query is one on the line 13. > > Please somebody help me, > > > Thanks, > > Douglas > > -- - michael dykman - [EMAIL PROTECTED] - All models are wrong. Some models are useful.