Code:
SELECT a.`timestamp`,a.`method`,a.`id`,d.`studentname` FROM `schools` a INNER JOIN `schoolstudent` d ON a.`studentid`=d.`studentid` WHERE a.`pid` IN ( SELECT MAX(`pid`) FROM `schools` GROUP BY `method`,`id`,`order` ) ORDER BY a.`id` ASC;
SELECT a.`timestamp`,a.`method`,a.`id`,d.`studentname` FROM `schools` a INNER JOIN `schoolstudent` d ON a.`studentid`=d.`studentid` WHERE a.`pid` IN ( SELECT MAX(`pid`) FROM `schools` GROUP BY `method`,`id`,`order` ) ORDER BY a.`id` ASC;
timestamp method id comment 2009-01-10 getThud 16 "....." 2009-01-10 getFoo 12 "....." 2009-01-10 getBar 12 "....." 2009-01-11 getFoo 12 "....." 2009-01-11 getBar 12 "....."
timestamp method id comment
select max(timestamp),method,id from tables where 1 group by method,id order by timestamp desc
select * from table where timestamp between 2012-04-10 10:15:21 AND 2012-04-10 18:15:21
SELECT d.`studentid`, SUM(a.`totalfee` - (SELECT SUM(`feeamount`) FROM
.....<a href="<?php the_permalink() ?>" target="_blank"><?php echo intro_text(84); ?></a>
"SELECT MIN(`time`) AS start_time, MAX(`time`) AS end_time,`remarks`, TIMEDIFF(MAX(`time`), MIN(`time`)) AS duration FROM `db_table` WHERE `time` BETWEEN '$predate' AND
Leave a comment: