Search code examples
phpmysqlormkohana-3kohana-orm

Kohana Prepared Statements or Query Building?


I'm trying to get to grips with Kohana framework for a new project. I just wanted to ask what your thoughts were on the two different methods for executing queries. Does one method pose any limitations?

http://kohanaframework.org/guide/tutorials.databases 1. Prepared Statements 2. Query Building

I want to make the right decision before I start building the app.

Many thanks!


Solution

  • Both have their own machnism to escape the user input. I prefer the Query Builder, because I think it is easier to read later on. But that is just a matter of taste. Both are the same and will have the same limitations.

    Offtopic: Have a look at the ORM that comes with Kohana 3. It is really easy and works like a charm. I only use the query builder for complex queries.