Welcome Guest, Not a member yet? Register   Sign In
very newbie question
#1

[eluser]Unknown[/eluser]
hey,
im new to php and codeigniter and i want to create something with ci.
here is my question, how can i create like this query

Code:
SELECT username,password FROM users WHERE username=$foo AND password=$bar

with codeigniter activerecord ? like this ?

Code:
$this->db->select('username,password');
$this->db->from('users');
$this->db->where('username', $foo);
$this->db->where('password', $bar);
$query = $this->db->get();

thanx form help.


Messages In This Thread
very newbie question - by El Forum - 03-03-2008, 03:29 PM
very newbie question - by El Forum - 03-03-2008, 04:24 PM
very newbie question - by El Forum - 03-03-2008, 04:25 PM
very newbie question - by El Forum - 03-03-2008, 07:51 PM
very newbie question - by El Forum - 03-06-2008, 04:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB