摘要: LIKE% 表示任何字符(NULL除外)出现任意次(0--无穷个)。同时还必须注意大小写问题。_ 表示任何字符出现1(不能多也不能少)次正则模式^ $ .(匹配任意单个字符,包括换行)[] |* + ?(m) (m,) (m,n) (,n)mysql>select 'abcdefg' REGEXP '^a'mysql> select 'abcdef' Regexp 'g$';mysql> select 'abcdef' Regexp '.f';mysql> select &# 阅读全文
posted @ 2013-01-14 19:59 fsl 阅读(3407) 评论(0) 推荐(1) 编辑
摘要: 字符串1,属性 length2,方法charAtcharCodeAtconcatindexoflastIndexOflocaleComparematchreplacesearchslicesplitsubstrsubstringtoLowerCasetoStringtoUpperCasevalueOf静态方法String.fromCharCode3,实例1.声明var myString = new String("Every good boy does fine.");var myString = "Every good boy does fine."; 阅读全文
posted @ 2013-01-08 11:53 fsl 阅读(3145) 评论(1) 推荐(0) 编辑
摘要: 基本选择器#id $("#id").class $("#.class) element $("p") 选择p标签* $("*") 选择所有元素select1,select2,select3 $("div,span,p") 选择所有div,span,p元素select#id.class $("p#head") 选择含有id为head的p元素层次选择器$("div span") 选择div元素下的所有span元素$("div>span") 选择 阅读全文
posted @ 2012-11-29 13:48 fsl 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 其实主要涉及的就是分类,文章,摘要,博客自定义信息调用等方法 1,首先调用导航,需要使用分类内容 2,首页调用文章内容,一般包括标题,摘要,作者,时间等内容 3,到具体栏目页面,调用指定栏目下的内容(分为指定调用和自动调用) 4,文章页面的展示 5,图片内容调用(一般来说是调用文章中的第一个图片) 阅读全文
posted @ 2012-09-06 14:44 fsl 阅读(14121) 评论(0) 推荐(0) 编辑
摘要: 第一次分支时其实就是整个base.php文件的执行base.php这个文件了,它是PHPCMS框架入口文件,他引入了很多的函数库,如://加载公用函数库pc_base::load_sys_func('global');————公用函数库pc_base::load_sys_func('extention');————扩展库pc_base::auto_load_func();————自动加载的库上面的三个函数包含了三个分支文件分别是libs/functions文件夹下的 global.func.php, extention.func.php和autoload/plu 阅读全文
posted @ 2012-05-30 18:30 fsl 阅读(1278) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="454" height="219"><mx:HTTPService id="hs" url="mails.php" method="POST" sh 阅读全文
posted @ 2012-05-22 01:30 fsl 阅读(242) 评论(0) 推荐(0) 编辑
摘要: MySQL技术内幕mysql使用大全,可以说方方面面都包括了。认真研读大概一本就差不多了MySQL开发者SQL权威指南这本应该是mysql的sql天书了。学mysql的sql语句,本书必不可少,缺点是看着有点别扭。高性能MySQL高可用MySQL:构建健壮的数据中心上面这俩本应该是提级必备,我还没时间看完,但是确实是不错的书。登堂入室的书啊MySQL必知必会没有时间看大部头,快餐也是不错的,书的质量还是靠谱的MYSQL Cookbook属于格斗大全了,属于翻查类型的参考书深入浅出MySQL--数据库开发、优化与管理维护小清新类型的,方方面面都有涉及,浅出足够,深入吗,就不一定了。不过整体来说还 阅读全文
posted @ 2012-05-18 15:39 fsl 阅读(8053) 评论(3) 推荐(5) 编辑
摘要: 1,数值类型2,字符串类型3,日期和时间4,ENUM和SET5,几何数据类型数据类型选项unsigned 无负值zerofill 数值显示有影响,会前置0来填充不足位数的数据auto_increment serial default value==声明auto_increment notnulltinyint -128----127smallint -32768----32767mediumint -8388608-----8388607int(integer) -2147483648----2147483647bigint -92233720368547758... 阅读全文
posted @ 2012-05-18 14:45 fsl 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 主键create table feng(teamno int not null,playerno int not null,division char(6) not null,primary key(teamno))create table feng(teamno int not nullprimary key,playerno int not null,division char(6) not null,)复合主键create table feng(teamno int not null,playerno int not null,division char(6) not null,prim 阅读全文
posted @ 2012-05-18 14:42 fsl 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 表创建create table mytbl(id int auto_increment not null,name char(10) not null,birth date not null,wight int,sex enum('f','m'));指定数据库引擎的表创建create table mytbl(id int auto_increment not null,name char(10) not null,birth date not null,wight int,sex enum('f','m'))engine=memo 阅读全文
posted @ 2012-05-07 15:45 fsl 阅读(932) 评论(0) 推荐(0) 编辑
摘要: 数据库选定,数据库选定后依然可以使用其他数据库中的数据表,只要指定【数据库.数据表】即可use db_nameselect * from db_name.tbl_name显示所有数据库mysql> select schema_name from information_schema.schemata;+--------------------+| schema_name |+--------------------+| information_schema || feng || mysql |+--------------------+3 rows in set... 阅读全文
posted @ 2012-05-02 16:51 fsl 阅读(1102) 评论(0) 推荐(0) 编辑
摘要: show databasesshow tablesinformation_schemashow tables 语句的输出不包含temporary表查看服务器所有数据库>show databases查看给定数据库的 create database语句>show create database db_name查看默认数据库的数据表或给定数据库的数据表>show tables>show tables from db_name查看给定数据库的数据表的create table语句>show create table tbl_name查看数据表里的列或索引信息>show 阅读全文
posted @ 2012-04-25 23:50 fsl 阅读(515) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Data;using System.Data.SqlClient;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { string constring = "data so 阅读全文
posted @ 2012-04-22 22:26 fsl 阅读(881) 评论(0) 推荐(0) 编辑
摘要: smary文件配置步骤//步骤1require '/libs/Smarty.class.php';//步骤2$smarty = new Smarty;//步骤3/*$smarty->template_dir = "";$smarty->compile_dir = "";$smarty->cache_dir = "";$smarty->caching = 1;$smarty->cache_lifetime = 60*60;//秒,这里的值是一个小时$smarty->left_delim 阅读全文
posted @ 2012-04-08 23:08 fsl 阅读(1156) 评论(0) 推荐(0) 编辑
摘要: 【创建xml】$dom=new DOMDocument("1.0");$book=$dom->appendChild($dom->createElement('book'));//创建根元素$title=$book->appendChild($dom->createElement('title'));//在根元素下创建节点$title->appendChild($dom->createTextNode('php cookbook'));//在节点下创建子节点$title->setAtt 阅读全文
posted @ 2012-04-06 15:56 fsl 阅读(262) 评论(0) 推荐(0) 编辑
摘要: /*date()函数年 Yy月m 数字表示2位n 数字表示无前导0F 月份字母全拼M 3个字母缩写日d 日期2个数字表示j 日期数字表示无前导0S 日期的序数后缀l 星期几字母全拼表示D 星期几的3字母表示w 星期几的数字表示,周日=0周六=6小时h 12小时两位g 12小时H 24小时两位 G 24小时a am/pmA AM/PM0分i 两位数字表示j 同上无前导0秒s 两位数字表示Z完整日期crU*/$time=time();$formats=array('ymd','YMD','yls');foreach($formats as $form 阅读全文
posted @ 2012-04-01 15:24 fsl 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 创建数组$my_arr=array();$my_arr=array('a','b','c','d');$my_arr=array(1,2,3,4);$my_arr=array('a'=>'x1','b'=>'x2','c'=>'x3','d'=>'x4');$str=range('a','z');print_r ($str);out:Array ( 阅读全文
posted @ 2012-02-27 13:06 fsl 阅读(865) 评论(0) 推荐(0) 编辑
摘要: ASP数组是比较好用的装载大量数据的容器。1 定义数组有两种方式:DIM和REDIM。DIM定义的是固定个数、数据类型的数组;而REDIM则不同,它可以定义不同类型的数据,也可以定义个数并非固定的数据。比较下面几个例子。 都合法的例子:Dim myarray(5,2)Redim myarray(5,2)前者错误而后者合法的例子:n=10 n=10Dim myarray(n)Redim myarray(n,2)另外REDIM还可以定义未定类型的数组,如:Redim myarray(10) 2 数组个数在以DIM或REDIM定义数组时指定的下标,表示的是访问该数组时所容许的最大下标,却不是该数组的 阅读全文
posted @ 2012-02-07 13:39 fsl 阅读(1556) 评论(0) 推荐(0) 编辑
摘要: GetRows()方法是将数据从 Recordset 复制到二维数组中,这是一个二维数组,第一个下标标识字段,第二个则标识记录号,所以rsArray = rs.GetRows()rsArray(0, 0)就表示记录集第一行的第一字段值rsArray(1, 0)就表示记录集第一行的第二字段值数组的数据是保存在内存中的,这就从根本上解决了每次显示记录还需向数据库请求的麻烦参考:关于GetRows()的详细介绍和用法GetRows 方法将 Recordset 对象的多个记录恢复到数组中。语法array = recordset.GetRows( Rows, Start, Fields )返回值返回二维 阅读全文
posted @ 2012-02-07 13:24 fsl 阅读(914) 评论(0) 推荐(0) 编辑
摘要: 一、首先是一个index.php PHPCMS 入口 。统一入口文件。define('PHPCMS_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR);include PHPCMS_PATH.'/phpcms/base.php';pc_base::creat_app();解释dirname(__FILE__) 函数返回的是脚本所在在的路径DIRECTORY_SEPARATOR是一个显示系统分隔符的命令,是php内置常量include PHPCMS_PATH.'/phpcms/base.php'直接包含服务器 阅读全文
posted @ 2012-01-01 01:39 fsl 阅读(3272) 评论(0) 推荐(1) 编辑