摘要: 转自:http://www.24xuexi.com/w/2011-08-16/96385.html数据库用的是MYSQL,现在出了问题都不能访问.出现以下错误Mysql error description: Can't connect to MySQL server on 'localhost' (10061)Mysql error number: 2003一般情况下,出现类似上面的数据库信息,不必重装系统,也不必查找具体出现了什么问题,统一解决方案:重启Mysql或重装Mysql。错误代码以及出错信息对照大全0101 属于其他进程的专用标志。0102 标志已经设置,无 阅读全文
posted @ 2012-06-11 15:09 myD 阅读(858) 评论(0) 推荐(0)
摘要: aa表mysql> select * from aa;+------+--------+--------+| id | name | other |+------+--------+--------+| 1 | asdf | dfdfd || 2 | sdf | fdfd || 3 | dfasdf | dfdasd || 4 | fasdf | fdasd || 5 | asdf | dasd || 6 | bsdf | hell0 |+------+--------+--------+联合索引mysql> sh... 阅读全文
posted @ 2012-06-11 14:26 myD 阅读(4095) 评论(0) 推荐(0)
摘要: 转自:http://gaojohn.blogchina.com/1257810.htmlHTTP_CLIENT_IP:可通过http头伪造HTTP_X_FORWARDED_FOR:可通过http头伪造REMOTE_ADDR:可能是用户真实IP也可能是代理IP服务端获取IP地址 http://www.taoyiz.com/util/ip 其代码如下:$s_onlineip = getenv(‘HTTP_CLIENT_IP’);echo “HTTP_CLIENT_IP:”.$s_onlineip.”<br/>\n”;$s_onlineip = getenv(‘HTTP_X_FORWAR 阅读全文
posted @ 2012-06-08 09:45 myD 阅读(1976) 评论(0) 推荐(0)
摘要: char(M)M最多255varchar(M)M最多65516mysql> alter table yy modify b varchar(65516);Query OK, 1 row affected (0.17 sec)Records: 1 Duplicates: 0 Warnings: 0mysql> alter table yy modify b varchar(65517);ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B 阅读全文
posted @ 2012-04-05 11:35 myD 阅读(3182) 评论(0) 推荐(0)
摘要: 查询 '产品的名字和公司的名字' 从产品表左连接公司表,再左连接用户表,product->company->user① 有where条件:用户名是‘sdf’mysql> explain select product.name pname,company.name cname from product left join company using(cid) left join user using(cid) where user.name = 'sdf' \G*************************** 1. r... 阅读全文
posted @ 2012-03-31 08:54 myD 阅读(304) 评论(0) 推荐(0)
摘要: 子查询形式的执行计划mysql> explain select * from user where id = (select uid from uu where id = 3)\G*************************** 1. row *************************** id: 1 select_type: PRIMARY table: user type: constpossible_keys: PRIMARY key: PRIMARY key_len: 4 r... 阅读全文
posted @ 2012-03-30 14:54 myD 阅读(384) 评论(0) 推荐(0)
摘要: 两个函数:① source/function_common.php----->inserttable()function inserttable($tablename, $insertsqlarr, $returnid=0, $replace = false, $silent=0) { global $_SGLOBAL; $insertkeysql = $insertvaluesql = $comma = ''; foreach ($insertsqlarr as $insert_key => $insert_value) { $insertkeysql .= .. 阅读全文
posted @ 2012-03-28 16:45 myD 阅读(237) 评论(0) 推荐(0)
摘要: 当插入的字符数超过varchar(n)限制的长度时,字符会被截断,不会出错,但会有警告mysql> create table aa(name varchar(12));Query OK, 0 rows affected (0.06 sec)mysql> insert into aa value('qwertyuiopasdf');Query OK, 1 row affected, 1 warning (0.03 sec)mysql> show warnings;+---------+------+-------------------------------- 阅读全文
posted @ 2012-03-28 12:00 myD 阅读(269) 评论(0) 推荐(0)
摘要: 在表tt(id)上建立外键,id不是主键 ,bb(bid)也不是主键 ,出错 创建表bb时建立外键 ,bb(bid)不是主键 tt(id)也不是主键,出错 创建表bb时建立外键,bb(bid)是主键 tt(id)不是主键,出错 创建表bb时建立外键,bb(bid)是主键 tt(id)是主键,成功 查 阅读全文
posted @ 2012-03-28 10:31 myD 阅读(2462) 评论(1) 推荐(0)
摘要: 1.cp_blog.php 和 cp_blog.htm两个文件构成了浏览器中的日志编辑界面2.编辑后 间接 提交本页3.包含function_blog.php也就是函数blog_post()函数体所在的文件include_once(S_ROOT.'./source/function_blog.php');if($newblog = blog_post($_POST, $blog)) {····}4.调用blog_post()函数处理接收到的数据5.返回值$newblog 是一个数组:$blogarr = Array( 'subje 阅读全文
posted @ 2012-03-24 16:22 myD 阅读(237) 评论(0) 推荐(0)