摘要:
转: http://www.yiichina.com/topic/4509 阅读全文
摘要:
想打印Sql的话,可以用把你要执行的命令例如queryAll(),queryOne(),execute()换成getRawSql(); 例如 : 要看$result = Yii::$app->db->createCommand()->update('table', ['name' => $name] 阅读全文
摘要:
查询单条数据$sql = "SELECT `name` FROM `table` WHERE id='7'";$users=Yii::$app->db->createCommand($sql)->queryOne();查询多条$sql = "SELECT `name` FROM `table` WH 阅读全文
摘要:
要显示图片就把'pic'换成[ 'attribute'=>'pic', 'format' => 'raw', 'value' => function($model){ return Html::img($model->pic); }],如果你的图片地址没有问题就可以显示了 阅读全文
摘要:
<?= $form->field($model, 'time')->textInput()->hiddenInput(['value'=>time()])->label(false); ?>$model 是当前模型层的文件 time 是字段名 hiddenInput是表单类型 value是表单初始值 阅读全文
摘要:
使用绝对路径登录 /phpStudy/mysql/bin/mysql -uroot -p; 设置远程登录密码 GRANT ALL PRIVILEGES ON *.* TO 'itoffice'@'%' IDENTIFIED BY 'itoffice' WITH GRANT OPTION;(第一个it 阅读全文
摘要:
在安装yii的时候 ,当打开了init.bat进行配置的时候小黑本弹出了个小黑框立刻就关闭了, 进入cmd模式再打开init.bat就出现了"You don't have permission to access on this server"的这个错误,后来综合网上的各个文章,找到了造成了这个问题 阅读全文