1 回答

TA貢獻(xiàn)1831條經(jīng)驗(yàn) 獲得超9個(gè)贊
我不確定,但我認(rèn)為您正在尋找類似的東西:
class Layout {
private $sql, $row;
private function set_layout($cond, $cond_r) {
$this->sql = $this->select("*", "table", "".$cond."", array($cond_r));
$rows = array();
foreach ($this->sql as $this->row) :
$rows[] = $this->row['name'];
endforeach;
return implode($rows); //Return array of rows AFTER loop
}
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);
- 1 回答
- 0 關(guān)注
- 136 瀏覽
添加回答
舉報(bào)