내 테이블의 모든 밴드에 액세스하여 목록으로 인쇄하기 위해 노력하고 있어요,하지만 난 그것을 실행할 때이 오류가 얻을 :CodeIgniter는 - 정의되지 않은 속성 오류
Severity: Notice
Message: Undefined property: CI_Loader::$model_bands
Filename: views/band_view.php
Line Number: 16
band_view.php :
를<h3>List of Bands:</h3>
<?php
$bands = $this->model_bands->getAllBands();
echo $bands;
?>
model_bands.php : 그것은이 일을 왜
function getAllBands() {
$query = $this->db->query('SELECT band_name FROM bands');
return $query->result();
}
누군가가 나에게 pleease 수 있을까요? 당신은이 작업을 수행해야 할 이유
확실한 foreach ($ bands는 $ band)입니까? 그 가변적 인 밴드가 존재하지 않는다는 이유 때문에 – Divergent