摘要: 字符串:string s = "1,2,3,4,5,"目标:删除最后一个 ","方法:用的最多的是substring,这个也是我一直用的s=s.substring(0,s.length-1) 阅读全文
posted @ 2013-03-14 12:16 TBHacker 阅读(3351) 评论(0) 推荐(0) 编辑
摘要: 代码:$db = &$this->getAdapter();$sql = "UPDATE t_scoreclass AS sc SET sequence_name=(SELECT sequence_name FROM t_exams AS ex WHERE sc.sequence=ex.sequence AND sc.type=ex.type GROUP BY sequence_name) WHERE sc.type= ".$type." AND sc.sequence = ".$seq... 阅读全文
posted @ 2013-03-14 10:45 TBHacker 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 代码:1 UPDATE t_scoreuser AS sc2 SET sequence_name=(SELECT sequence_name 3 FROM t_exams AS ex4 WHERE sc.sequence=ex.sequence AND sc.type=ex.type GROUP BY sequence_name)5 WHERE sc.type=7 AND sc.sequence=2;分析:这是一段子查询的代码提取其中的一段代码分析UPDATE t_scoreuser AS scSET sequence_name=(SELECT sequence_name ... 阅读全文
posted @ 2013-03-14 10:24 TBHacker 阅读(263) 评论(0) 推荐(0) 编辑