随笔 - 347  文章 - 1 评论 - 44 阅读 - 201万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

03 2012 档案
php修改排序,上移下移
摘要:/** $UpDown //移动方向,up或down $table //表名 $id //当前移动的ID $id_col //ID字段的名称 $oc_col //排序字段的名称 $where //条件*/function MoveUpDown($UpDown,$table,$id,$id_col='id',$oc_col='OrderColumn',$where='') { if($UpDown=='up'){$op='<';$desc='desc';}else{$op='>&# 阅读全文
posted @ 2012-03-09 00:41 FreeSpider 阅读(3137) 评论(0) 推荐(0) 编辑
MySQL:Mysql字符串截取函数SUBSTRING的用法说明
摘要:感觉上MySQL的字符串函数截取字符,比用程序截取(如PHP或JAVA)来得强大,所以在这里做一个记录,希望对大家有用。 函数: 1、从左开始截取字符串 left(str, length) 说明:left(被截取字段,截取长度) 例:select left(content,200) as abstract from my_content_t 2、从右开始截取字符串 right(str, length) 说明:right(被截取字段,截取长度) 例:select right(content,200) as abstract from my_content_t 3、截取字符串 substring( 阅读全文
posted @ 2012-03-05 10:59 FreeSpider 阅读(568) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示