`
onedada
  • 浏览: 100684 次
  • 性别: Icon_minigender_1
  • 来自: 宁波
社区版块
存档分类
最新评论
文章列表
本文转载自:   http://wangwei.cao.blog.163.com/blog/static/1023625262010063402377/     后台有很字段都是采用时间戳的形式,二者如何转换的,每次都搜索,真麻烦,就记下来吧。其实时间和IP类型的字段都有数字来存储的话,还是优点还是很大的,最直接的就是会省掉不少的存储空间。   1、将时间转换为时间戳select unix_timestamp('2009-10-26 10-06-07')如果参数为空,则处理为当前时间2、将时间戳转换为时间select from_unixtime(1256540102)有些应用生成的时 ...
本文转载自:   http://www.xker.com/page/e2010/1120/99113.html   MySQL服务器的线程数需要在一个合理的范围之内,这样才能保证MySQL服务器健康平稳地运行。Threads_created表示创建过的线程数,通过查看Threads_created就可以查看MySQL服务器的进程状态。 mysql> show global status like 'Thread%';   +-------------------+-------+   | Variable_name | Value |   +---------------- ...
本文转载自:   http://www.2cto.com/database/201108/99073.html     在MySQL中进行条件插入数据时,可能会用到以下语句,现小结一下。我们先建一个简单的表来作为测试: CREATE TABLE `books` (   `id` INT(11) NOT NULL AUTO_INCREMENT,   `name` VARCHAR(200) NOT NULL,   PRIMARY KEY (`id`),   UNIQUE KEY `NewIndex1` (`name`) ) ENGINE=InnoDB DEFAULT CHARSE ...
本文转载自:   http://publish.it168.com/2006/0310/20060310036801.shtml     【IT168 服务器学院】PHP Code one: <?$iipp=$_SERVER["REMOTE_ADDR"];echo $iipp;?>   PHP Code two: <?php$user_IP = ($_SERVER["HTTP_VIA"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : ...
本文转载自:   http://blog.chinaunix.net/uid-10697776-id-2935481.html       如何将四个字段以点分开的IP网络址协议地址转换成整数呢?PHP里有这么一个函数ip2long.比如 echoip2long("10.2.1.3");?>   我们将得到   167903491   这是如何计算的,目前我知道有两个算法。其一 functionip2int($ip){ //我们先把ip分为四段,$ip1,$ip2,$ip3,$ip4 list($ip1,$ip2,$ip3,$ip4)=explode ...
本文转载自:     http://blog.csdn.net/longyulu/article/details/8488456       对于mysql的复制相同表结构方法,有create table as 和create table like 两种,区别是什么呢?     create table t2 as select * from t1 where 1=2 ; 或者 limit 0; as创建出来的t2表(新表)缺少t1表(源表)的索引信息,只有表结构相同,没有索引。     create table t2 like t1 ; like 创建出来的新表包含源表的 ...

freebsd兼容linux

    博客分类:
  • Unix
本文转载自:    http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu-lbc-install.html     FreeBSD Handbook Prev Chapter 11 Linux® Binary Compatibility Next 11.2 Installation Linux® libararies are not installed on FreeBSD by default and Linux binary compatibility is not enabled ...
本文转载自:   http://www.jb51.net/article/14108.htm            我做了一个统一的出错提示函数,在函数执行里面,先处理出错的地址写入cookie以方便用户登陆以后可以直接跳转到要执行的这个页面,可是发现在服务器上测试时,竟然提示本地没有出现的错误: Warning: Cannot modify header information - headers already sent by.... 这样的语句,很显然,造成这个原因是因为setcookie造成的,查了一下网上,有如下的解释: cookie本身在使用上有一些限制,例如: 1.呼叫 ...
本文转载自:   http://hi.baidu.com/thinkinginlamp/item/88fd66da58ff0ae4795daad3     前记:很多东西看似简单,那是因为你并未真正了解它。Explain命令用于查看执行效果。虽然这个命令只能搭配select类型语句使用,如果你想查看update,delete类型语句中的索引效果,也不是太难的事情,只要保持条件不变,把类型转换成select就行了。explain的语法如下:explain [extended] select ... from ... where ...如果使用了extended,那么在执行完explain语 ...
本文转载自:   http://blog.knowsky.com/240717.htm     今天在编程的时候,学习了replace into的用法,真的很好用,是insert into的增强版。在向表中插入数据时,我们经常会遇到这样的情况:1、首先判断数据是否存在;2、如果不存在,则插入;3、如果存在,则更新。 在SQL Server中可以这样处理: if not exists (select 1 from t where id = 1)? insert into t(id, update_time) values(1, getdate()) else update t se ...
本文转自:   http://blog.csdn.net/jiguanghoverli/article/details/7902791     Windows 系统下Git安装图解 简单来说Git是一个免费的、开源的版本控制软件,从功能上讲,跟我们比较熟悉的Subversion(SVN)这类版本控制软件没什么两样。由于工作的需求,需要在WinXP下安装git配合团队完成相应的工作,以前一直在别的系统下使用,今天经Drupal花园的龙马指点终于安装成功了,特意贴出来与有需要的童鞋一起分享。 获取Git软件: 大家可以通过两种方式获取Git的软件,一个是在官网上获取,另一个可以点击这里 ...
本文转自:      http://blog.csdn.net/microtong/article/details/4683920     #Indexes 使目录内的文件或子目录以列表方式显示    Options Indexes    #This turns on fancy indexing of directories.    IndexOptions FancyIndexing    #果目录中含有HTML文件,则Apache会自动读取HTML文件的<title>......</title>部分    #用 HTML文件的标题作为Description( ...
本文转载自:     http://codejm.iteye.com/blog/1540046     MySQL 5.5 中对于二进制日志 (binlog) 有 3 种不同的格式可选:Mixed,Statement,Row,默认格式是 Statement。总结一下这三种格式日志的优缺点。MySQL Replication 复制可以是基于一条语句 (Statement Level) ,也可以是基于一条记录 (Row Level),可以在 MySQL 的配置参数中设定这个复制级别,不同复制级别的设置会影响到 Master 端的 bin-log 日志格式。 1. Row日志中会记录成每一行 ...

freebsd上安装git(2)

    博客分类:
  • Unix
本文转载自:     http://cni.stanford.edu/wiki/Git       Git We are using gitosis to manage our git repositories on nims. Contents [hide] 1 initial client configuration 2 creating a new repository 3 cloning an existing repository 4 gitosis on FreeBSD initial client configuration I ...

freebsd上安装git(1)

    博客分类:
  • Unix
本文转自:     http://forums.freebsd.org/showthread.php?t=10810       How to setup a Git repository   This howto will describe how to setup a Git repository: Dedicated user for Git repos SSH will be used for commits Enable gitweb for web access (Apache will be used) Anonymous cloning using t ...
Global site tag (gtag.js) - Google Analytics