$rs = $db->query("SELECT * FROM setting WHERE cid='$cid'");
while($r = $db->fetch_array($rs)) {
$setting[$r['key']] = $r['value'];
}当用$rs = M('Setting')->where('cid='.$cid)->select();出来时,我想要从结果集中取得一行作为关联数组,上面的while($r = $db->fetch_array($rs)) {}用tp怎么写?