Welcome Guest, Not a member yet? Register   Sign In
where_in null and 1
#1

->where_in('Login',array(null,1))

not working pls help me.

Attached Files Thumbnail(s)
       
Reply
#2

@ulas,

We need more info then that. Is the query not returning data? Can we see the rest of the query? What are you expecting the query to return?
Reply
#3

This looks more of a mysql question. I don't think you can use NULL inside a WHERE IN clause.
Try 'WHERE Login = 1 OR Login IS NULL'

You could use $db->get_compiled_select() to see how CI has constructed the query and then try and make it work in phpmyadmin or whatever.
Reply
#4

found solution;

->group_start()
->where(array('Login'=>null))
->or_where(array('Login'=>1))
->group_end()

thank you!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB