Welcome Guest, Not a member yet? Register   Sign In
Passing Variables to SQL Query
#1

Hello,

I am trying to pass a session variable = userid to a model which runs a sql query then passes the query back to the controller which passes the data to thew view.

Apologies for the newbie question, if you could point me in the right direction or provide a link to some tutorials that would be much appreciated Smile

function functionname($data){
$query = $this->db->query("SELECT * FROM table WHERE column = $data");

return $query->result();

}
Reply


Messages In This Thread
Passing Variables to SQL Query - by Wolrab - 05-05-2015, 04:04 PM
RE: Passing Variables to SQL Query - by casa - 05-07-2015, 02:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB