Exemplo n.º 1
0
 function insertData($values)
 {
     require_once 'AMP/System/Data/Item.inc.php';
     $source = new AMPSystem_Data_Item($this->dbcon);
     $source->setSource($this->datatable);
     $source->setData($values);
     $sql = $source->debug_insertSQL();
     if ($this->dbcon->Execute($sql)) {
         if (defined($this->_debug_constant) && constant($this->_debug_constant)) {
             AMP_DebugSQL($sql, get_class($this) . " insert");
         }
         return $this->dbcon->Affected_Rows();
     }
     trigger_error(sprintf(AMP_TEXT_ERROR_DATABASE_SQL_FAILED, get_class($this), 'insert', $this->dbcon->ErrorMsg(), $sql));
     return false;
 }