这个结构将有几个页面,只有 foreach 或 while 只显示最后一个结果,这个问题发生在我做了这个函数之后,我已经看到了几个问题,并且与 matriz 相关
class Layout {
private $sql, $row;
private function set_layout($cond, $cond_r) {
$this->sql = $this->select("*", "table", "".$cond."", array($cond_r));
foreach ($this->sql as $this->row) :
return $this->row['name'];
endforeach;
}
public function get_layout($cond, $cond_r) {
return $this->set_layout($cond, $cond_r);
}
}
echo $midia->get_layout("WHERE status != ? ORDER BY id DESC", 0);
天涯尽头无女友