Zeile 8 | Zeile 8 |
---|
* */
|
* */
|
class DB_MySQLi
| class DB_MySQLi implements DB_Base
|
{ /** * The title of this layer.
| { /** * The title of this layer.
|
Zeile 620 | Zeile 620 |
---|
}
/**
|
}
/**
|
* Lists all functions in the database.
| * Lists all tables in the database.
|
* * @param string The database name. * @param string Prefix of the table (optional)
| * * @param string The database name. * @param string Prefix of the table (optional)
|
Zeile 788 | Zeile 788 |
---|
} else {
|
} else {
|
$array[$field] = "'{$value}'";
| $array[$field] = $this->quote_val($value);
|
} }
| } }
|
Zeile 837 | Zeile 837 |
---|
} else {
|
} else {
|
$values[$field] = "'{$value}'";
| $values[$field] = $this->quote_val($value);
|
} } $insert_rows[] = "(".implode(",", $values).")";
| } } $insert_rows[] = "(".implode(",", $values).")";
|
Zeile 892 | Zeile 892 |
---|
} else {
|
} else {
|
if(is_numeric($value)) { $query .= $comma."`".$field."`={$value}"; } else { $query .= $comma."`".$field."`={$quote}{$value}{$quote}"; }
| $quoted_value = $this->quote_val($value, $quote);
$query .= $comma."`".$field."`={$quoted_value}";
|
} $comma = ', ';
|
} $comma = ', ';
|
}
| }
|
if(!empty($where)) { $query .= " WHERE $where";
| if(!empty($where)) { $query .= " WHERE $where";
|
Zeile 912 | Zeile 907 |
---|
if(!empty($limit)) { $query .= " LIMIT $limit";
|
if(!empty($limit)) { $query .= " LIMIT $limit";
|
}
| }
|
return $this->write_query(" UPDATE {$this->table_prefix}$table SET $query ");
|
return $this->write_query(" UPDATE {$this->table_prefix}$table SET $query ");
|
| }
private function quote_val($value, $quote="'") { if(is_int($value)) { $quoted = $value; } else { $quoted = $quote . $value . $quote; }
return $quoted;
|
}
/**
| }
/**
|
Zeile 1262 | Zeile 1271 |
---|
} else {
|
} else {
|
$values .= $comma."`".$column."`='".$value."'";
| $values .= $comma."`".$column."`=".$this->quote_val($value);
|
}
$comma = ',';
| }
$comma = ',';
|