CodeIgniter Forums

Full Version: AR get row if null
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]JanDoToDo[/eluser]
hi guys,

i want to do this query: can someone correct it so that i can use IFNULL?

Thanks!

Code:
$this -> db -> get_where($this -> config -> item('messages_tbl'), array('recipient_id' => $id, 'date_read' => NULL))

El Forum

[eluser]JanDoToDo[/eluser]
Ok.. so i did that as it writes the query ok. What if wanted it so that it wasnt null?