Vergleich inc/db_mysql.php - 1.8.0 - 1.8.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 8Zeile 8
 *
*/


 *
*/


class DB_MySQL

class DB_MySQL implements DB_Base

{
/**
* The title of this layer.

{
/**
* The title of this layer.

Zeile 623Zeile 623
	}

/**

	}

/**

	 * 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 788Zeile 788
			}
else
{

			}
else
{

				$array[$field] = "'{$value}'";

				$array[$field] = $this->quote_val($value);

			}
}


			}
}


Zeile 837Zeile 837
				}
else
{

				}
else
{

					$values[$field] = "'{$value}'";

					$values[$field] = $this->quote_val($value);

				}
}
$insert_rows[] = "(".implode(",", $values).")";

				}
}
$insert_rows[] = "(".implode(",", $values).")";

Zeile 892Zeile 892
			}
else
{

			}
else
{

				if(is_numeric($value))
{
$query .= $comma."`".$field."`={$value}";
}
else
{
$query .= $comma."`".$field."`={$quote}{$value}{$quote}";
}

				$quoted_val = $this->quote_val($value, $quote);

$query .= $comma."`".$field."`={$quoted_val}";






			}
$comma = ', ';

			}
$comma = ', ';

		}


		}


		if(!empty($where))
{
$query .= " WHERE $where";

		if(!empty($where))
{
$query .= " WHERE $where";

Zeile 912Zeile 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 1280Zeile 1289
			}
else
{

			}
else
{

				$values .= $comma."`".$column."`='".$value."'";

				$values .= $comma."`".$column."`=".$this->quote_val($value);

			}

$comma = ',';

			}

$comma = ',';