摘要: 今天翻PHP的文档 偶然看到ctype函数 觉得很好用 记录下来以备后用:Ctype 函数Table of Contentsctype_alnum — Check for alphanumeric character(s) 检查字符串中只包含数字或字母,相当于正则[A-Za-z0-9]. 有返回值。ctype_alpha — Check for alphabetic character(s) 检查字符串中只包含字母。 有返回值。ctype_cntrl — Check for control character(s) 检查字符串中是否只包含" '\n' '\r& 阅读全文
posted @ 2011-03-28 16:56 confusing 阅读(1024) 评论(0) 推荐(1) 编辑
摘要: 今天项目遇到一个varchar数据类型排序的问题原来的SQL语句如下 :mysql> SELECT sno FROM mytable WHERE sdate = '2011-03-15' ORDER BY sno;显示结果+------+| sno |+------+| 1 | | 10 | | 11 | | 12 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | | 8 | | 9 | +------+12 rows in set (0.00 sec)问题原因:varchar类型只按照每一位进行排序 所以造成排序结果不正确解决:mysql> 阅读全文
posted @ 2011-03-28 11:08 confusing 阅读(1539) 评论(1) 推荐(2) 编辑