very newbie question

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

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

with codeigniter activerecord ? like this ?

$this->db->where('username', $foo);
$this->db->where('password', $bar);
$query = $this->db->get();

thanx form help.

[eluser]louis w[/eluser]
Looks right to me. What happens?

looks right to me too.

you can also turn on the profiler by typing
which will allow you to view the queries that were generated.

Every days a schoolday, thanks for the tip Wink

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.