application/models/upload_model.php
//function to get the files of a user from the database
function to get the files of a user from the database
function to get the files of a user from the database
public function user_files()
	{
		$user_id = $this->session->userdata('user_id');
		$this->db->select("id, file_name, url");
		$this->db->where("user_id", $user_id);
		$query = $this->db->get("files");
		return $query->result();
	}
public function user_files ( ) { $ user_id = $ this -> session -> userdata ( 'user_id' ) ; $ this -> db -> select ( " id, file_name, url " ) ; $ this -> db -> where ( " user_id " , $ user_id ) ; $ query = $ this -> db -> get ( " files " ) ; return $ query -> result ( ) ; }
function to get the files of a user from the database
function to get the files of a user from the database
//retrieve the user_id from the session //find all the results from the table "files" with the user_id corresponding to the user logged