Welcome Guest, Not a member yet? Register   Sign In
Which ORM use alongside codeigniter
#10

[eluser]dejan[/eluser]
[quote author="skunkbad" date="1350355408"]
I meant CI's query builder. I'm perfectly comfortable with plain 'ol SQL, so I mostly just like the query builder because it will sanitize my input, and query bindings are super easy. I could see how a person would not be comfortable with complex queries and want more of the query builder features or ORM, but a lot of it just seems like makeup on an old ugly lady. It's not that I want to see her, but I know what I'm dealing with![/quote]

Besides sanitazion, query builder makes for more readable and maintainable code. Take for example:

Code:
$db->where('x', $a);
if ($condition) {
  $db->where('y', $b);
} else {
  $db->like('z', $c ? 'yes' : 'no');
}
$db->get($table);

In my humble opinion, it looks much better than it would if you were writing it out as a string.


Messages In This Thread
Which ORM use alongside codeigniter - by El Forum - 10-14-2012, 11:30 AM
Which ORM use alongside codeigniter - by El Forum - 10-14-2012, 11:49 AM
Which ORM use alongside codeigniter - by El Forum - 10-14-2012, 02:18 PM
Which ORM use alongside codeigniter - by El Forum - 10-14-2012, 04:17 PM
Which ORM use alongside codeigniter - by El Forum - 10-15-2012, 03:24 AM
Which ORM use alongside codeigniter - by El Forum - 10-15-2012, 11:29 AM
Which ORM use alongside codeigniter - by El Forum - 10-15-2012, 11:38 AM
Which ORM use alongside codeigniter - by El Forum - 10-15-2012, 07:43 PM
Which ORM use alongside codeigniter - by El Forum - 10-15-2012, 11:53 PM
Which ORM use alongside codeigniter - by El Forum - 10-22-2012, 06:40 AM
Which ORM use alongside codeigniter - by El Forum - 10-23-2012, 04:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB