Welcome Guest, Not a member yet? Register   Sign In
I can't to do works two functions at same times.
#7

[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.


Messages In This Thread
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 05:55 AM
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 09:40 AM
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 05:52 PM
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 07:26 PM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:19 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:27 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:40 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:49 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:56 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 11:28 AM
I can't to do works two functions at same times. - by El Forum - 10-14-2012, 02:37 PM
I can't to do works two functions at same times. - by El Forum - 10-14-2012, 02:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB