Gallery3:Developer Handbook:Database Abstraction Layer - Gallery Codex
Personal tools

Gallery3:Developer Handbook:Database Abstraction Layer

From Gallery Codex

Revision as of 13:16, 13 June 2011 by Ckdake (Talk | contribs) (Created page with "=Database Abstraction Layer= Gallery 3 uses the Kohana Database Abstraction Layer. This is well documented on the Kohana website: * [http://docs.kohanaphp.com/libraries/databas...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Database Abstraction Layer

Gallery 3 uses the Kohana Database Abstraction Layer. This is well documented on the Kohana website:

Notes about the Gallery 3 database abstraction layer:

  • You don’t have to worry about creating connections to the database, this is handled for you by the Gallery 3 framework
  • Gallery 3 only supports MySQL 5.x so it’s perfectly legal to use SQL statements that are only supported by MySQL 5.x.
  • The Kohana docs are slightly out of date. To build a query, the new syntax is:

db::build()

  • Gallery 3 database tables can have a prefix to distinguish them from other tables in the same database. To support prefixes properly, all table names must be wrapped in curly braces whenever used in a database query. For example: $db->query(“SELECT * FROM {tags}”)
advertisements