07 2012 档案
摘要:AR模型中可以通过relations()方法建立关系class B public function relations() { return array( 'a'=>array(self::BELONGS_TO, 'A', 'id') ); }这样一对一关系就建立好了。$b = B::model()->find($criteria);$a = $b->a;第二步是利用一个lazyFinder重新查询结构赋值给$a;四种关系:关系定义例子BELONGS_TOA和B的关系是一对多,那么B属于APost属于UserHAS_M...
阅读全文
摘要:If any of you have ever experienced a problem with xdebug non displaying var_dump() with the nice overload method it includes, especially when using PHP 5.3, you may try the following:Open your php.ini file(for instance located in /etc/php5/apache2/php.ini)Locate the line that sayshtml_errors = OffC
阅读全文

浙公网安备 33010602011771号