mysql different query result in localhost and online server
<p>I have a table with the name tblusermesin and have data like this </p>

<pre><code>Id  id_mesin  id_io       waktu           value
 1   m001     io001   2016-09-27 17:08:01   0
 2   m001     io002   2016-09-27 17:09:39   0
 3   m001     io002   2016-09-27 17:09:59   1
 4   m001     io001   2016-09-27 17:10:00   1
 5   m001     io001   2016-09-28 10:03:10   0
 6   m001     io001   2016-09-28 10:03:11   1
 7   m001     io001   2016-09-28 10:03:12   0
</code></pre>

<p>I want to get the last data for each io_id. I use query </p>

<pre><code>select  id_mesin,id_io,waktu,value FROM 
(select  id_mesin,id_io,waktu,value from tblusermesin  order by waktu desc)a
group by id_io;
</code></pre>

<p>In localhost the result is right but when I use this query on online server, the result is different.</p>

<p>what's wrong and make this happen? please help me. thank you</p>