Mysql 操作日常记录

1、删除多余的空记录
delete from table where column1 is null and colunm2 is null;
2、group by函数的排序问题(求和与排序)
select sum(bian_page) bian_page,sum(shen_page) shen_page,sum(jiao_page) jiao_page ,name,xueduan,xueke,sum(day) day from table where xueduan=’{1}’ and status=’1’ and xueke=’{1}’ GROUP by name ORDER by bian_page DESC

你可能感兴趣的:(PHP)