Zeile 8 | Zeile 8 |
---|
* */
|
* */
|
class DB_SQLite
| class DB_SQLite implements DB_Base
|
{ /** * The title of this layer.
| { /** * The title of this layer.
|
Zeile 153 | Zeile 153 |
---|
* @param boolean 1 if hide errors, 0 if not. * @return resource The query data. */
|
* @param boolean 1 if hide errors, 0 if not. * @return resource The query data. */
|
function query($string, $hide_errors=0)
| function query($string, $hide_errors=0, $write_query=0)
|
{ global $pagestarttime, $db, $mybb;
| { global $pagestarttime, $db, $mybb;
|
Zeile 287 | Zeile 287 |
---|
* @param constant The type of array to return. * @return array The array of results. */
|
* @param constant The type of array to return. * @return array The array of results. */
|
function fetch_array($query)
| function fetch_array($query, $resulttype=PDO::FETCH_BOTH)
|
{
|
{
|
$array = $this->db->fetch_array($query);
| $array = $this->db->fetch_array($query, $resulttype);
|
return $array; }
| return $array; }
|
Zeile 471 | Zeile 471 |
---|
}
/**
|
}
/**
|
* 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 645 | Zeile 645 |
---|
} else {
|
} else {
|
$array[$field] = "'{$value}'";
| $array[$field] = $this->quote_val($value);
|
} }
| } }
|
Zeile 695 | Zeile 695 |
---|
} else {
|
} else {
|
$values[$field] = "'{$value}'";
| $values[$field] = $this->quote_val($value);
|
} } $insert_rows[] = "(".implode(",", $values).")";
| } } $insert_rows[] = "(".implode(",", $values).")";
|
Zeile 751 | Zeile 751 |
---|
} else {
|
} else {
|
$query .= $comma.$field."={$quote}".$value."{$quote}";
| $quoted_value = $this->quote_val($value, $quote);
$query .= $comma.$field."={$quoted_value}";
|
} $comma = ', ';
|
} $comma = ', ';
|
}
| }
|
if(!empty($where))
|
if(!empty($where))
|
{
| {
|
$query .= " WHERE $where";
|
$query .= " WHERE $where";
|
}
| }
|
$query = $this->query("UPDATE {$this->table_prefix}$table SET $query"); $query->closeCursor(); return $query;
|
$query = $this->query("UPDATE {$this->table_prefix}$table SET $query"); $query->closeCursor(); return $query;
|
| }
private function quote_val($value, $quote="'") { if(is_int($value)) { $quoted = $value; } else { $quoted = $quote . $value . $quote; }
return $quoted;
|
}
/**
| }
/**
|
Zeile 1065 | Zeile 1081 |
---|
} else {
|
} else {
|
$values .= $comma."'".$value."'";
| $values .= $comma.$this->quote_val($value);
|
}
$comma = ',';
| }
$comma = ',';
|