pixnet/pixframework — pull request #34 by ronnywang (2012-08-23 07:04:11+00:00)
Title: Pix_Table::newEmptyTable() add $table_name parameter

Usage:

$table = Pix_Table::newEmptyTable('SomeTable');
$table->_columns['id'] = array('type' => 'int', 'auto_increment' => true);
$table->_columns['value'] = array('type' => 'text');
$table->_primary = array('id');
$table->_name = 'some_table';
$table->createTable();

// ...

$row = SomeTable::find(1);
$new_row = SomeTable::insert(array(
'value' => 'foo',
));