Skip to content

Developer Guide: Data Access Objects (DAO's)

ginatrapani edited this page Sep 13, 2010 · 18 revisions

All of ThinkTank’s database interactions are encapsulated in DAO’s (Data Access Objects), contained in the model (the common directory).

DAO Method Interfaces

Let’s draft what common DAO methods should return.

  • INSERT: last inserted ID (where there is an AUTO_INCREMENT primary key)
  • UPDATE/DELETE: number of affected rows
  • SELECT: rows as associative arrays, false if no rows returned
Clone this wiki locally