|
@@ -510,7 +510,7 @@ EOF_STRUCT_MYSQL;
|
|
|
|
|
|
|
|
public function insert($tableName, $item, $sqlSchema = []) {// @returns int last inserted id
|
|
public function insert($tableName, $item, $sqlSchema = []) {// @returns int last inserted id
|
|
|
if (empty($tableName)) throw new Exception("Missing table name");
|
|
if (empty($tableName)) throw new Exception("Missing table name");
|
|
|
- if (empty($item) || !is_array($item)) throw new Exception("Missing item");
|
|
|
|
|
|
|
+ if (!is_array($item)) throw new Exception("Missing item");
|
|
|
$sqlFields = [];
|
|
$sqlFields = [];
|
|
|
$sqlValues = [];
|
|
$sqlValues = [];
|
|
|
foreach ($item as $field => $val) {
|
|
foreach ($item as $field => $val) {
|