Evo update
PHP kôd:
function insertRow($table, $data) {
$dbFieldNames = $dbFieldValues = "";
foreach ($data as $field=>$value) {
$comma = next($data) !== false ? "," : "";
$dbFieldNames .= $field.$comma;
$dbFieldValues .= "'".$value."'".$comma;
}
return $this->rawQuery("INSERT INTO $table ($dbFieldNames) VALUES ($dbFieldValues)");
}