php - Remove duplicate data from database -


i new in php. have fetch large amount of data database of duplicate data removed. here database:

http://i.imgur.com/n6ixlaf.png

output :

http://i.imgur.com/yqitox7.png

here start time 10 3 pm , rest end time. when start/end time 2 data found fast data counted

i supose know mysql query...

in php do:

$mysqlresult = query (....,'         select distinct ac_no          ?¿?¿?         order stime desc     ');  foreach ($mysqlresult $key=>$var){     query(...'     delete ?¿?¿? t        t.ac_no = '.$var['ac_no'] .'          , t.stime != '.$var['stime']); 

now have deleted database everything.

analyst code, please correctly on php (and please, log , comment something)


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -