07 2015 档案

摘要:e.g.为充值记录表进行排序,按照分数进行排序算出排名,当充值金额一样的时候,充值时间早的排名靠前 阅读全文
posted @ 2015-07-27 10:29 S大好人S 阅读(144) 评论(0) 推荐(0)
摘要:$sql = 'INSERT INTO `table1`(`customerID`, `advertisementID`, `consumedStatus`, `consumedTime`) VALUES (:customerID,:advertisementID,:con... 阅读全文
posted @ 2015-07-26 22:56 S大好人S 阅读(668) 评论(0) 推荐(0)
摘要:例1$connection=Yii::app()->db;$sql="SELECT*FROM`project`ORDERBYidDESC";$command=$connection->createCommand($sql);$result=$command->queryAll();print_r($... 阅读全文
posted @ 2015-07-25 15:21 S大好人S 阅读(164) 评论(0) 推荐(0)
摘要:uasort($lastingDates, array($this, 'sortLastingDays'));//在这里sortLastingDays为排序方法//含义是按照数组中的lastingdate的大小进行排序public function sortLastingDays($a, $b){ ... 阅读全文
posted @ 2015-07-22 10:34 S大好人S 阅读(164) 评论(0) 推荐(0)
摘要:$queryResults = $returnClass::findBySql('SELECT * FROM `$returnClassName` where APPID >= :start && APPID 0, ':end' => $LastIndex - 1))->all(); ... 阅读全文
posted @ 2015-07-21 11:46 S大好人S 阅读(167) 评论(0) 推荐(0)
摘要:[ 'class' => 'app\actions\GzhAppFormatOutput',//此处要注意actions一定是GzhAppFormatOutput.php所在的文件夹 'objectsToFormat' => 'abc',... 阅读全文
posted @ 2015-07-20 21:14 S大好人S 阅读(250) 评论(0) 推荐(0)
摘要:菜鸟从零学习数据库(二)——触发器本人水平有限,写此博客只为给那些像我一样的菜鸟一点小小的帮助,还请各位大牛不要见笑。数据库的重要性就不用我多说了吧,我们做的大多数项目都要跟数据库打交道。因此,熟练掌握数据库的各种操作,就成了一个程序员必备的技能。今天我们就来简单说一下触发器。 触发器简介: 触... 阅读全文
posted @ 2015-07-17 20:48 S大好人S 阅读(492) 评论(0) 推荐(0)
摘要:在写UNIT TEST的时候,难免有的时候会遇到错误,遇到错误就需要把变量值打印出来:可以在代码中加:codecept_debug($returnMessage);然后在运行UNIT TEST的时候使用:codecept_debug($returnMessage)即可 阅读全文
posted @ 2015-07-09 15:46 S大好人S 阅读(401) 评论(0) 推荐(0)
摘要:1:配置好phpMyAdmin后,通过IP/phpmyadmin就可一访问远程数据库了2:为安全性需要设置密码,修改文件/opt/lampp/phpmyadmin/config.inc.php: 具体设置如下 1, $cfg['Servers'][$i]['host'] = 'localhos... 阅读全文
posted @ 2015-07-05 11:41 S大好人S 阅读(1216) 评论(0) 推荐(0)
摘要:date("Y-m-d G:H:s",strtotime("+1 week 1 days 1 hours 1 seconds")); 阅读全文
posted @ 2015-07-02 22:21 S大好人S 阅读(171) 评论(0) 推荐(0)
摘要:1:首先按照官方指导安装所需组件 For the local installation use following commands: composer require "codeception/codeception=2.0.*" composer require "codeception/... 阅读全文
posted @ 2015-07-02 16:36 S大好人S 阅读(437) 评论(0) 推荐(0)
摘要:http://www.tech126.com/git-fetch-pull/ Git中从远程的分支获取最新的版本到本地有这样2个命令: 1. git fetch:相当于是从远程获取最新版本到本地,不会自动merge git fetch origin mastergit log -p master.. 阅读全文
posted @ 2015-07-01 21:27 S大好人S 阅读(183) 评论(0) 推荐(0)
摘要:PASH环境变量的设置方法: 方法一:用户主目录下的.profile或.bashrc文件(推荐) 登录到你的用户(非root),在终端输入: $ sudo gedit ~/.profile(or .bashrc) 可以在此文件末尾加入PATH的设置如下: export PATH=”$PATH:... 阅读全文
posted @ 2015-07-01 14:11 S大好人S 阅读(270) 评论(0) 推荐(0)