docteursas
Messages postés33Date d'inscriptionlundi 25 juillet 2005StatutMembreDernière intervention13 mars 2011
-
16 févr. 2011 à 16:09
phpAnonyme
Messages postés392Date d'inscriptionmercredi 28 octobre 2009StatutMembreDernière intervention23 mars 2012
-
16 févr. 2011 à 21:31
bonjour à tous,
j'ai un problème avec un code qui marchait normallement. J'ai changé de serveur voici le message que j'ai quand j'exécute la page:
__________________________________________
Fatal error: Call to undefined method tNG_multiple::tNG_multiple() in /home/polarisc/public_html/includes/tng/tNG_multipleInsert.class.php on line 42
__________________________________________
voici le code à la ligne 42:
parent::tNG_multiple($connection);
if ($this->multTNGs[$i-1]->getError()) {
$sw = $this->multTNGs[$i-1]->wereValuesSubmitted();
if ($sw) {
$failed = true;
} else {
if ($i!=1) {
// if there was an unival error on one of the 2nd-to-last inserts, ignore it.
$this->multTNGs[$i-1]->setError(null);
}
}
} else {
$this->noSuccess++;
$this->primaryKeyColumn['value'] = $this->multTNGs[$i-1]->getPrimaryKeyValue();
}
}
if ($this->noSuccess == 0) {
$failed = true;
}
if ($failed) {
$ret = new tNG_error('MINS_ERROR', array(), array());
if ($this->executeSubSets === false) {
for ($i=0;$i<sizeof($this->multTNGs);$i++) {
if (!$this->multTNGs[$i]->getError()) {
$this->multTNGs[$i]->setError($ret);
$this->multTNGs[$i]->executeTriggers('ERROR');
}
}
}
}
if ($this->executeSubSets === false) {
$this->noSuccess = 0;
}
tNG_log::log('tNG_multipleInsert', 'prepareSQL', 'end');
return $ret;
}
function getLocalRecordset() {
//Transaction was not started, use the default values
$fakeArr = array();
$tmpArr = $this->columns;
$fakeRs = array();
if (!isset($tmpArr[$this->primaryKey])) {
$tmpArr[$this->primaryKey] = $this->primaryKeyColumn;
$tmpArr[$this->primaryKey]['default'] = NULL;
}
foreach($tmpArr as $colName=>$colDetails) {
$tmpVal = KT_escapeForSql($colDetails['default'], $colDetails['type'], true);
$fakeArr[$colName] = $tmpVal;
}
for ($i=0;$i<$this->insertElements;$i++) {
$fakeArr[$this->pkName] = "KT_NEW";
$fakeRs[$i] = $fakeArr;
}
return $this->getFakeRecordset($fakeRs);
}