Skip to content

Instantly share code, notes, and snippets.

@shofetim
Created January 26, 2012 18:23
Show Gist options
  • Select an option

  • Save shofetim/1684184 to your computer and use it in GitHub Desktop.

Select an option

Save shofetim/1684184 to your computer and use it in GitHub Desktop.
BT ORM
<?php
class transfer extends App_BT_Object_Db {
/**
* Which single default database table relates to this object
*/
protected $_sDefaultTable = 'indusoft_transfers';
public function getAllEnabled()
{
return $this->getBy();
}
/**
* Title representation of the object
*/
public function getTitle()
{
return $this->db_name;
}
}
$row = new transfer;
$row->db_from = 'FROM';
$row->db_to = 'TO';
$row->db_estimatedBarrels = '1000';
$this->save($row);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment