Rumah > Soal Jawab > teks badan
网上查了很多资料,基本上是原生方法,或者是只能查询一条:
以上为例,是否可以查询该表中所有数据的"_id"字段?
阿神2017-04-26 09:05:33
$kriteria = EmongoCriteria();
$criteria->sort('posts_count',EMongoCriteria::SORT_DESC)
->had(25)
->offset(0);
$test_id = Kumpulan::model()->findAll($criteria);
$test_id->next();
$_ids = array();
$name_id = array();
while($row = $test_id->current()){
$t = $row->atribut;
$name_id[] = array_splice($t,0,2);
$_ids[] = $name_id;
$test_id->next();
}
$test_id = $_ids[count($_ids)-1];
Ini adalah penyelesaian terakhir, tetapi ia berasa sangat bodoh.