diff --git a/dblayer.php b/dblayer.php index b18aeac..550108e 100644 --- a/dblayer.php +++ b/dblayer.php @@ -480,7 +480,7 @@ class dblayer } // Check if the foreign keys constrains are valid before doing the insertion - foreach ($this->foreign as $foreign=>$data) + foreach ($this->foreign as $foreign=>$d) { if ($updatekey === false) { @@ -505,11 +505,11 @@ class dblayer } else { - if (! array_key_exists ($foreign, $data)) + if (! array_key_exists ($foreign, $d)) continue; } - $table = $data[0]; - $column = $data[1]; + $table = $d[0]; + $column = $d[1]; $req = "SELECT $this->sep$column$this->sep ". "FROM $this->sep$this->tableprefix$table$this->sep ". "WHERE $this->sep$column$this->sep=:".md5 ($column);