Example #1
0
                if ($val[1]->updatable) {
                    $val[0] = $val[1]->Update($val[0]);
                    if ($val[0] != "false") {
                        $fields .= $dbname . ",";
                        $values .= "" . $val[0] . ",";
                    }
                }
            }
            $fields = substr($fields, 0, -1);
            //remove last
            $values = substr($values, 0, -1);
            $string .= $start . "(" . $fields . ")" . " VALUES(" . $values . ");";
            array_push($mysqlQrs, $string);
            $string = "";
            # }
        }
    }
}
//echo "**" . $string;
$mysqli = SQL_Connector::getMysqliInstance();
foreach ($mysqlQrs as $query) {
    echo "<br>**" . $query . "**<br>";
    if (!$mysqli->query($query) && GlobalVars::getDebug()) {
        //
        echo $mysqli->error;
    }
}
$id = mysql_insert_id();
$pb = str_replace("[ID]", $id, $_POST["PB"]);
//last id for step stuff
header("Location: " . $pb);
Example #2
0
 public function Edit()
 {
     $mysqli = SQL_Connector::getMysqliInstance();
     $sqlstr = "update " . $this->entityType . " SET " . $this->GetUpdateList() . " WHERE " . $this->getWhere();
     if (!$mysqli->query($sqlstr) && GlobalVars::getDebug()) {
         echo $mysqli->error;
     }
 }