[eluser]masentinel900[/eluser]
Thanks "Skunkbad", Do you have the reason.
But I need to make each one functions with content brought of a functions of a model.
So.
Model
Code:
class user extends CI_Model
{
function login($username, $password)
{
$this -> db -> select('*');
$this -> db -> from('usuario');
$this -> db -> where('username = ' . "'" . $username . "'");
$this -> db -> where('password = ' . "'" . MD5($password) . "'");
$this -> db -> limit(1);
$query = $this -> db -> get();
if($query -> num_rows() == 1)
{
return $query->result();
}
else
{
return false;
}
}
function content()
{
$query = $this->db->query('SELECT * FROM actas');
foreach ($query->result_array() as $row)
{
echo $row['codigoagencia'];
echo $row['nombreacta'];
echo $row['rutaarchivo'];
echo $row['descripcion'];
echo $row['creadopor'];
echo $row['modificadopor'];
echo $row['fechadecreacion'];
echo $row['fechademodificacion'];
}
return $query->fetch_assoc();
}
}
I use the function login for to make a loggin acces to my website and works perfect, But now I need brought information of different tables of my DB. Is by this that I need make several functions with different information.
Now I need to get this content of differents tables, pass to my controller for to define some rules and finally may show it in my view page.