Prechádzať zdrojové kódy

fixed sql error on insert

Piotr Labudda 9 rokov pred
rodič
commit
1fb249cdda
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      SE/se-lib/Data_Source.php

+ 1 - 1
SE/se-lib/Data_Source.php

@@ -996,7 +996,7 @@ class Data_Source {
 		}
 		}
 
 
 		$primaryKey = $this->_db->ADD_NEW_OBJ($this->_tbl, (object)$item);
 		$primaryKey = $this->_db->ADD_NEW_OBJ($this->_tbl, (object)$item);
-		if ($primaryKey < 0) {
+		if ($primaryKey <= 0) {
 			$dsErrors = $this->getDbErrors();
 			$dsErrors = $this->getDbErrors();
 			$dsErrors = "Wystąpiły błędy!\n" . implode("\n", $dsErrors);
 			$dsErrors = "Wystąpiły błędy!\n" . implode("\n", $dsErrors);
 			throw new Exception($dsErrors);
 			throw new Exception($dsErrors);