Ejemplo n.º 1
0
 function test_insert()
 {
     $aVariables = array('affiliateid' => 23, 'zonename' => 'foo', 'description' => 'this is the desc', 'category' => 0, 'ad_selection' => 0, 'chain' => 0, 'prepend' => 0, 'append' => 0, 'updated' => '2007-04-03 16:41:15');
     $ret = SqlBuilder::_insert('zones', $aVariables);
     $this->assertTrue(is_int($ret));
     $this->assertTrue($ret > 0);
 }
Ejemplo n.º 2
0
 /**
  * Creates a new data row in the database.
  *
  * @param string $table Name of the table.
  * @param array  $aVariables Map of column name to value.
  * @return integer The inserted entity's ID.
  */
 function _addEntity($table, $aVariables)
 {
     Admin_DA::_updateEntityTimestamp($table, $aVariables);
     return SqlBuilder::_insert($table, $aVariables);
 }