⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

simple question: Using Where method in the list



josepichu
  • profile picture
  • Member

Posted 19 March 2012 - 09:27 AM

Hi!

I have not been able to show only same rows. For example:

$sql = "select * from tablename where date='".$date."'";

I want to filter for example by a Date.

I have seen the documentation but i don't know what the key variable mean:


void where[color=#66CC66]([/color] mixed [color=#0000FF]$key[/color] [color=#66CC66][[/color], string [color=#0000FF]$value[/color] [color=#66CC66][[/color], bool [color=#0000FF]$escape[/color][color=#66CC66]][/color] [color=#66CC66]][/color][color=#66CC66])[/color]

I mean?

Thanks!

naufal
  • profile picture
  • Member

Posted 19 March 2012 - 16:11 PM

It is same as 'where' in CI.

$this->db->where('date', $date);