Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Sql
#1

[eluser]Unknown[/eluser]
Hello I have a question with the sql with codeigniter.

I want to do this type of things :
( it is not syntaxe sql I know )
WHERE ( a = b AND c = d ) OR ( a = d AND c = b )

For do this I do :
$array = array( a => b, c => d);
$array2 = array(a => d, c => b);

// the rest of my code is ok with the database.
$db_default->where($array);
$db_default->or_where($array2);

When I do that the first part of array2 is ignored ( a => d ) and all the rest work.

Do you have a idea?


Messages In This Thread
CodeIgniter Sql - by El Forum - 06-21-2012, 06:06 AM
CodeIgniter Sql - by El Forum - 06-21-2012, 09:59 AM
CodeIgniter Sql - by El Forum - 06-22-2012, 02:11 AM
CodeIgniter Sql - by El Forum - 06-22-2012, 04:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB