Hi this may sound noob but i have recently started working mysqli->prepare() i have a following code and i want to return back the data from my model function to controller so that i can loop through the data how can i do that?
function get_student(){
$sql = "select student_id from student";
$stmt = $this->db_con->prepare($sql);
$stmt->execute();
$stmt->bind_result($student_id);
return ?
}
$result = $model->get_student();
PS : I don't want to store my result in an array and than return i know how to do that