摘要: select 日期=convert(varchar(10),reciveTime,120), CH=(selecttop1 CH from tb whereconvert(varchar(10),reciveTime,120)=convert(varchar(10),a.reciveTime,120) orderby reciveTime desc), 个数=count(*)from tb a groupbyconvert(varchar(10),reciveTime,120) 阅读全文
posted @ 2013-07-25 11:10 寂夜冷风 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 有表如下:姓名 科目 分数a 数学 30 a 语文 30 a 物理 30 a 化学 30 b 数学 30 .. .. ..最后要显示的格式如下: 姓名 数学 语文 物理 化学 总分a 30 30 30 30 120b 30 30 30 30 120.. .. ..select temp.姓名, (select 分数 from 成绩表 where 成绩表.姓名 = temp.姓名 and 科目 = 数学) as 数学, (select 分数 from 成绩表 where 成绩表.姓名 = temp.姓名 and 科目 = 语文) as 语文, ....... from (select... 阅读全文
posted @ 2013-07-25 11:09 寂夜冷风 阅读(142) 评论(0) 推荐(0) 编辑
摘要: select temp.学号,(select 成绩 from 六(1)班学生成绩表 where 六(1)班学生成绩表.学号=temp.学号 and 科目='数学' and 测试时间=#2012-10-1#) as 数学,(select 成绩 from 六(1)班学生成绩表 where 六(1)班学生成绩表.学号=temp.学号 and 科目='语文' and 测试时间=#2012-10-1#) as 语文 from (select distinct 学号 from 六(1)班学生成绩表) as temp 阅读全文
posted @ 2013-07-25 11:06 寂夜冷风 阅读(152) 评论(0) 推荐(0) 编辑
摘要: PHP分页");$page=$_GET["page"];if( isset($_POST["page"]) && $_POST["page"]!=""){ $page=$_POST['page']; } if($page=="") { $page=1; } if(is_numeric($page)) { $page_size=12; //每页多少条数据 $query="select count(*) as total from area_cla 阅读全文
posted @ 2013-07-25 11:04 寂夜冷风 阅读(823) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-07-25 10:58 寂夜冷风 阅读(561) 评论(0) 推荐(0) 编辑
摘要: form 中Enctype=multipart/form-data 的作用 表单中enctype="multipart/form-data"的意思,是设置表单的MIME编码。默认情况, 这个编码格式是application/x-www-form-urlencoded,不能用于文件上传; 只有使用了multipart/form-data,才能完整的传递文件数据,进行下面的操作.在Form元素的语法中,EncType表明提交数据的格式用 Enctype 属性指定将数据回发到服务器时浏览器使用的编码类型。 下边是说明: application/x-www-form-urlenco 阅读全文
posted @ 2013-07-25 10:56 寂夜冷风 阅读(1132) 评论(0) 推荐(0) 编辑