博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年7月6日

摘要: 阅读全文

posted @ 2011-07-06 15:51 峰雪 阅读(280) 评论(0) 推荐(0) 编辑

2011年6月27日

摘要: explain的语法如下:explain [extended] select … from … where …如果使用了extended,那么在执行完explain语句后,可以使用show warnings语句查询相应的优化信息。比如我们执行 select uid from user where uname=’scofield’ order by uid 执行结果会有| id | select_type | table | type| possible_keys | key | key_len | ref | rows | Extra |这些东西。其中 table 表示是哪个表的数据。type 阅读全文

posted @ 2011-06-27 17:42 峰雪 阅读(227) 评论(0) 推荐(0) 编辑

2011年6月23日

摘要: 先看一下官方对此方法的介绍官方地址 http://api.jquery.com/animate/.animate( properties, [duration,] [easing,] [complete] ) version added: 1.0properties A map of CSS properties that the animation will move toward.duration A string or number determining how long the animation will run.easing A string indicating which e 阅读全文

posted @ 2011-06-23 17:29 峰雪 阅读(4260) 评论(0) 推荐(0) 编辑

2011年4月25日

摘要: echo date("Y-m-d H:i:s",strtotime("now")). "<br />";echo date("Y-m-d H:i:s",strtotime("10 September 2000")). "<br />";echo date("Y-m-d H:i:s",strtotime("+2 day")). "<br />";echo date("Y-m 阅读全文

posted @ 2011-04-25 14:26 峰雪 阅读(407) 评论(0) 推荐(0) 编辑

2011年4月21日

摘要: 今天遇到群里发的一个问题,觉得有点意思,发上来看一下以下代码在MYSQL中测试通过,MSSQL应该能跑通,未测试。#创建表如下create temporary table tmp (a int, b int ,c int);insert into tmp VALUES (1,10,1),(10,10,2),(10,100,2);#mysql执行select sum(case when c = '1' then A else B end) from tmp#oracle执行select sum(decode(c,'1',a,b)) from tmp#普通联合查询s 阅读全文

posted @ 2011-04-21 18:35 峰雪 阅读(271) 评论(0) 推荐(0) 编辑

2011年4月14日

摘要: <?php interface myusbkou { function type();//类型 function action();//执行的操作 } class zip implements myusbkou { //继承接口 function type() { echo "USB的2.0接口"; } function action() { echo "--->需要USB 2.0驱动"; } } class mp3 implements myusbkou{ function type() { echo "MP3的1.0接口&quo 阅读全文

posted @ 2011-04-14 13:16 峰雪 阅读(563) 评论(0) 推荐(0) 编辑

2011年3月31日

摘要: 解决完了这个问题之后,还是感叹,基本的东西一定要理解透彻啊。今天有朋友问了个问题,如下var testarr=[{"a":"0"},{"b":"1"},{"c":"2"}];alert($.inArray({"a":"0"},testarr)); 说这个值总是返回-1;第一眼,我没注意到,于是自己写了一段给他看。var obj={'m':'1'};var arr=[obj,'1',2];a 阅读全文

posted @ 2011-03-31 15:52 峰雪 阅读(3585) 评论(3) 推荐(0) 编辑

摘要: 如下表格<table width="300" border="0"> <tr><th>姓名</th><th>年龄</th><th>手机</th><th>地址</th></tr> <tr><td>小明</td><td>24</td><td>12345678901</td><td>ABC</td></tr>&l 阅读全文

posted @ 2011-03-31 14:36 峰雪 阅读(2676) 评论(4) 推荐(1) 编辑

2011年3月23日

摘要: 目前在写程序时,在处理MYSQL时遇到一个问题,问题如下update dealer_admin set is_super_admin=1 where id in (select id from dealer_admin group by dealer_id );此时会报:#1093 - You can't specify target table 'dealer_admin' for update in FROM clause在网上找了一个暂时可以解决的方法create temporary table tmp (id int);insert into tmp (id) 阅读全文

posted @ 2011-03-23 17:19 峰雪 阅读(2126) 评论(1) 推荐(0) 编辑

2010年12月27日

摘要: 直接看代码,解决问题重点是加 `` ,为标准键盘中,Esc键下面的那个符号,输入状态需为英文 阅读全文

posted @ 2010-12-27 17:03 峰雪 阅读(422) 评论(0) 推荐(0) 编辑