django使用mysql出现警告 Warning: (3135, "'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.") Warning: (3090, "Changing sql mode
今天做项目的时候,遇到个小小的问题,在数据库中查询的时候,要用String类型的ID进行一下排序!(注:ID字段为 varchar 类型) 解决的方法: 如: SELECT * FROM Student WHERE 1 = 1 ORDER BY -ID DESC 或者: SELECT * FROM Student WHERE 1 = 1 ORDER BY (ID + 1) mysql时间格式化,按时间段查询MYSQL语句 2011-04-15 09:01:08| 分类: MySQL |