Welcome Guest, Not a member yet? Register   Sign In
Can not use Active Record for simple query?
#5

[eluser]seeraw[/eluser]
[quote author="Dennis Rasmussen" date="1299254749"][quote author="seeraw" date="1299254430"]Hi

I tested above query with my own conditions like

$this->db->select('*');
$this->db->from('TABLE_NAME');

$this->db->where('column name','value'); //condition one
$this->db->or_where('column name','value'); //condition tow
$this->db->where('column name','value'); //condition three
$this->db->or_where('column name','value'); //condition four
$this->db->get();

and it's working fine (it changes the sequence of "AND" and "OR" in your query other wise no problem with this query ),

what output you are getting with your query?

Thanks,
Swapnil[/quote]

Did you see his brackets?[/quote]


Yes but though it is complicated it will work it will not produce any error
What I mean you can also write the same query with AR


Messages In This Thread
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 02:53 AM
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 03:54 AM
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 04:00 AM
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 04:05 AM
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 04:21 AM
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 04:26 AM
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 04:42 AM
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 06:08 AM
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 06:14 AM
Can not use Active Record for simple query? - by El Forum - 03-04-2011, 06:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB