Showing 1-20 of 219 items.

Q: My yiic tool cannot run model and crud commands. Why?

Created 17 years ago by qiang qiang, updated 17 years ago by mishhh mishhh. 1 comment

Some PHP installations may use a different php.ini file for CLI PHP (command line PHP parser). As a result, when running the model or crud command in yiic shell, you may encounter errors like "YiiBase::include(PDO.php): failed to open stream..." or "...could not find driver", even though the requirement checker confirms you have PDO and the corresponding database driver.

0 0
1
Viewed: 20 058 times
Version: 1.1
Category: Tutorials

    Named scope - Get orphan AR without losing primary key

    Created 16 years ago by cma cma, updated 15 years ago by Steve Friedl Steve Friedl. 0 comments

    Sometime, in a many-to-many relation, you need to retrieve AR that aren't linked. In practice, AR with null value in the join table. So you implements a criteria like this :

    public function scopeUnused( $useAnd = true )
        {
            $join = " left outer join composed_by j on t.ID = j.ID ";
            $condition = ' j.ID Is Null';
    
    
    0 0
    2
    Viewed: 12 430 times
    Version: 1.1
    Category: Tutorials

      三步使用cronjobs自动化去执行Yii 控制台任务

      Created 15 years ago by Darwin Wen Darwin Wen, updated 15 years ago by Darwin Wen Darwin Wen. 0 comments

      这篇文章将介绍使用Linux cronjobs去自动化执行Yii Console Application(控制台)任务,像每天晚上执行缓存清理,临时文件清理,发送邮件,网站备份等等,重复的工作都交给服务器后台去完成,Yii本身已经提供了强大的支持,我们所做的工作就很少,当使用yiic webapp 自动生成工程结构时,强大的Yii已经全部帮我们生成好,仅仅只需三步。

      0 4
      2
      Viewed: 31 224 times
      Version: 1.1
      Category: Tutorials