怎样匹配记录集里的某条记录
比方说$query取到10条记录, 0-9我要取得其中某条字段为“id” 值=$this->uri->segment(3)) 的 row() ,应该怎么写啊?
如果我没说清楚,看下面我瞎想的代码应该能明白了。
$row = $query->row() ;
if($row->id = $this->uri->segment(3))
$x = $row();
$row2 = $query->row($x) ;
实际应用为数据库查询一组图片,其中某一张放大显示。 $row2 = $this->db->get_where('mytable', array('id' => $this->uri->segment(3)));
页:
[1]