摘要: 一.内联结、外联结、左联结、右联结的含义及区别在SQL标准中规划的(Join)联结大致分为下面四种:1.内联结:将两个表中存在联结关系的字段符合联结关系的那些记录形成记录集的联结。2.外联结:分为外左联结和外右联结。左联结A、B表的意思就是将表A中的全部记录和表B中联结的字段与表A的联结字段符合联结条件的那些记录形成的记录集的联结,这里注意的是最后出来的记录集会包括表A的全部记录。右联结A、B表的结果和左联结B、A的结果是一样的,也就是说:1SelectA.nameB.nameFromALeftJoinBOnA.id=B.id和1SelectA.nameB.nameFromBRightJoin 阅读全文
posted @ 2014-01-14 20:56 taoxiaodong 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 当前页面urlYii::app()->request->url;跳转前一个页面url$this->redirect(Yii::app()->request->urlReferrer);根目录URLYii::app()->baseUrl或Yii::app()->request->baseUrl;自定义URL$this->createUrl('post/read',array('id'=>100))或Yii::app()->createUrl();当前项目::Yii::getPathOfAlias(& 阅读全文
posted @ 2014-01-10 10:02 taoxiaodong 阅读(506) 评论(0) 推荐(0) 编辑
摘要: Ubuntu下为Firefox安装Adobe Flash Player使用环境: OS:Ubuntu 13.10 LTS Browser: Firefox 12.0 Adobe Flash Player: install_flash_player_11_linux.x86_64.tar.gz安装方法: 1.下载Adobe Flash Player: 请从Adobe官方下载,也可以从这个URL下载,这个URL也是官方的链接:http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.235/install_flash_... 阅读全文
posted @ 2014-01-06 18:53 taoxiaodong 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 1、更新1sudoapt-getupdate2、安装nginx1sudoapt-getintsallnginx Ubuntu安装之后的文件结构大致为: *所有的配置文件都在/etc/nginx下,并且每个虚拟主机已经安排在了/etc/nginx/sites-available下 *程序文件在/usr/sbin/nginx*日志放在了/var/log/nginx中 *并已经在/etc/init.d/下创建了启动脚本nginx *默认的虚拟主机的目录设置在了/var/www/nginx-default 下面可以启动nginx来看看效果(请确保80端口没有其他服务在使用): 1 ... 阅读全文
posted @ 2014-01-05 16:09 taoxiaodong 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 安装nginxsudo apt-get install nginxUbuntu安装之后的文件结构大致为:所有的配置文件都在/etc/nginx下,并且每个虚拟主机已经安排在了/etc/nginx/sites-available下程序文件在/usr/sbin/nginx日志放在了/var/log/nginx中并已经在/etc/init.d/下创建了启动脚本nginx默认的虚拟主机的目录设置在了/usr/share/nginx/html启动nginxsudo /etc/init.d/nginx start然后就可以访问了,http://localhost/, 一切正常!如果不能访问,先不要继续,看 阅读全文
posted @ 2014-01-05 15:48 taoxiaodong 阅读(729) 评论(0) 推荐(0) 编辑
摘要: PHP setcookie() 函数向客户端发送一个 HTTP cookie。cookie 是由服务器发送到浏览器的变量。cookie 通常是服务器嵌入到用户计算机中的小文本文件。每当计算机通过浏览器请求一个页面,就会发送这个 cookie。cookie 的名称指定为相同名称的变量。例如,如果被发送的 cookie 名为 "name",会自动创建名为 $user 的变量,包含 cookie 的值。必须在任何其他输出发送前对 cookie 进行赋值。如果成功,则该函数返回 true,否则返回 false。1setcookie(name, value, expire, path 阅读全文
posted @ 2013-12-04 18:59 taoxiaodong 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 参考:http://www.broadcom.com/docs/linux_sta/README.txt1.下载:http://www.broadcom.com/support/802.11/linux_sta.php2.编译:# ls /lib/modules/`uname -r`/build# mkdir hybrid_wl # cd hybrid_wl # tar xzf /hybrid-portsrc.tar or /hybrid-portsrc-x86_64.tar.gz# make clean (optional)# make 错误1:/home/zhuang/broadcom.. 阅读全文
posted @ 2013-11-17 18:00 taoxiaodong 阅读(600) 评论(0) 推荐(0) 编辑
摘要: 一、$connection=Yii::app()->db;$sql="SELECT*FROM`project`ORDERBYidDESC";$command=$connection->createCommand($sql);$result=$command->queryAll();print_r($result); 二、$db=Yii::app()->db;//youhavetodefinedbconnectioninconfig/main.php$sql="selectsum(if(starttime>'09:00:00&# 阅读全文
posted @ 2013-11-09 20:18 taoxiaodong 阅读(733) 评论(0) 推荐(0) 编辑
摘要: 注:$c=newCDbCriteria();是ActiveRecord的一种写法,使ActiveRecord更加灵活,而不是手册中DAO(PDO)和QueryBuilder。这是YiiCDbCriteria的一些笔记和常用用法:一、一个sql拼装的情况$criteria=newCDbCriteria;$criteria->addCondition("id=1");//查询条件,即whereid=1$criteria->addInCondition('id',array(1,2,3,4,5));//代表whereidIN(1,23,,4,5,);$ 阅读全文
posted @ 2013-11-06 14:27 taoxiaodong 阅读(731) 评论(0) 推荐(0) 编辑
摘要: 1、安装nginx,首先要在这里Ubuntu安装下列几个包$sudo apt-get install libpcre3 #默认有$sudo apt-get install zlib1g#默认有$sudo apt-get install libpcre3-dev$sudo apt-get install zlib1g-dev#默认有$sudo apt-get install libssl#默认有$sudo apt-get install libssl-dev(上面支持nginx的包均需要安装)2、安装nginx$sudo apt-get install nginx3、访问服务器本地主机:127. 阅读全文
posted @ 2013-11-03 13:41 taoxiaodong 阅读(493) 评论(0) 推荐(0) 编辑