Example:
https://github.com/jstayton/QueryBuilder
Are there any advantages to using: a query builder, rather than using raw SQL?
$q->select('*')->from('posts')->innerJoin('terms', 'post_id')->where(... E.g.
instead of just doing it the old-fashioned way:
$q->select('*') ->from('posts') ->innerJoin('terms', 'post_id') ->where(...) SELECT * FROM posts WHERE ... vs:
?
SELECT * FROM posts WHERE ... I see that many frameworks use these kind of abstraction layers, but I fail to understand the benefits :(.