Dingo Framework

Dingo is a Rapid Development Application Framework written in PHP. Dingo allows you to create dynamic changing websites easily and quickly.

Storing Queries For Later

It is possible to store SELECT, UPDATE, and DELETE queries for use at a later time:

// Select the table
$table = db('mytable');

// Construct the query
$query = $table->select('*')
               ->where('id','<=',10)
               ->order_by('id','DESC');

// Later... Execute the query
$query->execute();

Notice that we left the execute() method off of the query when we constructed it. Then later to run that query we simply use the execute() method on the $query object.

Note that you cannot store shorthand SELECT and DELETE queries for later use. For example you could not store this query:

// Select the table
$table = db('mytable');

$table->select('name','!=','Evan');

But you could store the full sized version of that query:

// Select the table
$table = db('mytable');

$query = $table->select('*')
               ->where('name','!=','Evan');

© 2008 - 2010 Evan Byrne