Assignment of Query value to local variable |
[eluser]shahnawazahmed[/eluser]
Hey everyone , i am new to programming and codeigniter as well, i am facing minor issue in getting value from the sql query here it is $this->db->where('email_address', $this->input->post('email_address')); i want to assign the email_address value to the $email local variable .. please give me a tip Thank you
[eluser]yacman[/eluser]
Code: $this->db->where(‘email_address’, $this->input->post(‘email_address’)); If your controller is receiving a posted variable with the name of email_address, then this single line of code is correct for preparing a database query with a where statement of Code: WHERE email_address = '[email protected]' I can't tell because of the lack of info, but you still need to call: Code: $query_result = $this->db->get('YOURTABLENAME'); Good Luck! Try some tutorials http://www.youtube.com/watch?v=SSE9mTLWmKs
|
Welcome Guest, Not a member yet? Register Sign In |