一个监控数据库的小脚本
可以通过运行这个脚本来监控数据库中的一项值的变化,来用0,1来判断这个值。-a small monitoring database scripts can run this script to monitor a database of the change, used to 0, 1 to judge the value.
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.001785s ]
SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.159468s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.002225s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.001146s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.001115s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.003373s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.001270s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.004459s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.041577s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.010894s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 285660 [ RunTime:0.024690s ]