kkk 发表于 2010-5-29 18:20:48

《PHP 敏捷开发框架 CodeIgniter》社区预览版(CTP),有错误

4.3.2 “读取”查询中:
$this->db->select('url','name','clientid');
$query = $this->db->get('sites');

其中的select语句是错误的,应该是:
   
$this->db->select('url,name,clientid');具体可见源代码:/**

* Select

*

* Generates the SELECT portion of the query

*

* @access
public

* @param
string

* @return
object

*/

function select($select = '*', $escape = NULL)

{

// Set the global value if this was sepecified


if (is_bool($escape))

{

$this->_protect_identifiers = $escape;

}



if (is_string($select))

{

$select = explode(',', $select);

}


foreach ($select as $val)

{

$val = trim($val);


if ($val != '')

{

$this->ar_select[] = $val;


if ($this->ar_caching === TRUE)

{

$this->ar_cache_select[] = $val;

$this->ar_cache_exists[] = 'select';

}

}

}

return $this;

}


错别字的话还能忍下,但是代码错误就不能原谅了,希望下一版本的时候能改正过来。

kkk 发表于 2010-5-29 18:22:54

同样的,在4.3.2中的最后一句:
$this->db->select('url','name','clientid','people.surname AS client');
也是错误的......

Hex 发表于 2010-5-29 21:46:48

感谢提出问题,此问题已经记录,下次发布会更新,谢谢。
页: [1]
查看完整版本: 《PHP 敏捷开发框架 CodeIgniter》社区预览版(CTP),有错误