cvs: peardoc /de/package/database/db intro-auto.xml
| From: | Alexander Merz | Date: | Wed, 30 Mar 2005 22:16:46 +0000 |
| Subject: | cvs: peardoc /de/package/database/db intro-auto.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5827@lists.php.net to get a copy of this message | ||
alexmerz Wed Mar 30 17:16:46 2005 EDT
Modified files:
/peardoc/de/package/database/db intro-auto.xml
Log:
initial german translation
http://cvs.php.net/diff.php/peardoc/de/package/database/db/intro-auto.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/de/package/database/db/intro-auto.xml diff -u peardoc/de/package/database/db/intro-auto.xml:1.1 peardoc/de/package/database/db/intro-auto.xml:1.2 --- peardoc/de/package/database/db/intro-auto.xml:1.1 Wed Mar 30 12:16:10 2005 +++ peardoc/de/package/database/db/intro-auto.xml Wed Mar 30 17:16:46 2005 @@ -1,32 +1,31 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.database.db.intro-auto"> <refnamediv> - <refname>Introduction - autoPrepare & autoExecute</refname> - <refpurpose>Automatically prepare and execute SQL statements</refpurpose> + <refname>Einführung - autoPrepare & autoExecute</refname> + <refpurpose>Automatische Vorbereitung und Ausführung von SQL-Anweisungen</refpurpose> </refnamediv> <refsect1 id="package.database.db.intro-auto.desc"> &title.desc; <refsect2> - <title>Purpose</title> + <title>Zweck</title> <para> <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> and + <function>autoPrepare</function></link> und <link linkend="package.database.db.db-common.autoexecute"> <function>autoExecute</function></link> - reduce the need to write boring - <command>INSERT</command> or <command>UPDATE</command> - SQL queries which are difficult to maintain when you - add a field for instance. + verringern den Aufwand langweilige + <command>INSERT</command> oder <command>UPDATE</command>-SQL-Abfragen + zu schreiben, welche schwer zu pflegen sind, wenn z.B. + eine neue Spalte ergänzt wird. </para> <para> - Imagine you have a 'user' table with 3 fields - (id, name and country). - You have to write sql queries like: - + Nehmen wir an, dass Sie eine Tabelle <userinput>user</userinput> + mit 3 Spalten (<userinput>id</userinput>,<userinput>name</userinput> und <userinput>country</userinput>) benutzen. + Dann müssten Sie Anweisungen schreiben wie: <programlisting role="sql"> <![CDATA[ INSERT INTO table (id, name, country) VALUES (?, ?, ?) @@ -34,19 +33,19 @@ ]]> </programlisting> - If you add a field ('birthYear' for example), you have to rewrite your - queries which is boring and can lead to bugs (if you forget one query for - instance). + Wenn Sie ein Feld hinzufügen (z.B. <userinput>birthYear</userinput>), dann müssen + alle entsprechenden Anfragen umgeschrieben werden. Eine langweilige Sache + und fehleranfällig, wenn man eine im Quelltext übersieht. </para> </refsect2> <refsect2> <title>autoPrepare</title> <para> - With <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link>, you don't have to write your - insert or update queries. For example: - + Mit <link linkend="package.database.db.db-common.autoprepare"> + <function>autoPrepare</function></link> müssen Sie keine + <command>INSERT</command> oder <command>UPDATE</command>-SQL-Abfragen + mehr schreiben. Z.B.: <programlisting role="php"> <![CDATA[ <?php @@ -63,26 +62,23 @@ ?> ]]> </programlisting> - - In this example, <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> will build the following SQL query: - + In diesem Beispiel erzeugt <link linkend="package.database.db.db-common.autoprepare"> + <function>autoPrepare</function></link> die folgende SQL-Abfrage: <programlisting role="sql"> <![CDATA[ INSERT INTO user (id, name, country) VALUES (?, ?, ?) ]]> </programlisting> - - And then, it will call <link linkend="package.database.db.db-common.prepare"> - <function>prepare</function></link> with it. + Mit dieser Abfrage wird <link linkend="package.database.db.db-common.prepare"> + <function>prepare</function></link> aufgerufen. </para> <para> - To add records, you have - to use <link linkend="package.database.db.db-common.execute"> - <function>execute</function></link> or <link + Um Datensätze einzufügen, müssen Sie die + <link linkend="package.database.db.db-common.execute"> + <function>execute</function></link>- oder <link linkend="package.database.db.db-common.executemultiple"> - <function>executeMultiple</function></link> like: + <function>executeMultiple</function></link>-Methode aufrufen: <programlisting role="php"> <![CDATA[ @@ -98,11 +94,8 @@ ?> ]]> </programlisting> - - So, you don't have to write any SQL <command>INSERT</command> - queries! And it works with <command>UPDATE</command> - queries too. For flexibility reasons, you have only to write - the <command>WHERE</command> clause of the query. For instance: + Genauso funktioniert es auch mit <command>UPDATE</command>-Abfragen. + Sie müssen für diesen Fall lediglich die <command>WHERE</command>-Klausel formulieren: <programlisting role="php"> <![CDATA[ @@ -129,7 +122,7 @@ </programlisting> <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> will build the following query: + <function>autoPrepare</function></link> wird die folgende Abfrage bauen: <programlisting role="sql"> <![CDATA[ @@ -137,34 +130,33 @@ ]]> </programlisting> - Then, it will call <link linkend="package.database.db.db-common.prepare"> - <function>prepare</function></link> with it. + Auch hier ruft es mit der erzeugten Abfrage die + <function>prepare</function></link>-Methode auf. </para> <para> - Be careful, if you don't specify any <command>WHERE</command> - clause, all the records - of the table will be updated. + Definieren Sie keine <command>WHERE</command>-Klausel + werden alle Datensätze der Tabelle geändert! </para> </refsect2> <refsect2> <title>autoExecute</title> <para> - Using <link linkend="package.database.db.db-common.autoexecute"> - <function>autoExecute</function></link> is the easiest way - to do insert or update queries. It is a mix of <link + <link linkend="package.database.db.db-common.autoexecute"> + <function>autoExecute</function></link> ist der schnellste Weg, + um <command>INSERT</command> oder <command>UPDATE</command>-Abfragen + durchzuführen. Es ist eine Kombination aus <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> and <link + <function>autoPrepare</function></link> und <link linkend="package.database.db.db-common.autoprepare"> <function>execute</function></link>. </para> <para> - You only need an associative array (key => value) where keys are fields - names and values are corresponding values of these fields. - For instance: - + Sie benötigen nur ein assoziatives Array (Schlüssel => Wert). + Als Schlüssel dienen die Spaltenbezeichnungen und als deren Wert die einzutragenden + Werte. <programlisting role="php"> <![CDATA[ <?php @@ -186,9 +178,7 @@ ?> ]]> </programlisting> - - And that's all! The following query is built and executed: - + Damit wird die folgende Abfrage erzeugt und ausgeführt: <programlisting role="sql"> <![CDATA[ INSERT INTO user (id, name, country) @@ -198,7 +188,7 @@ </para> <para> - And it's the same thing for <command>UPDATE</command> queries: + Analog laufen <command>UPDATE</command>-Abfragen ab: <programlisting role="php"> <![CDATA[ @@ -220,9 +210,7 @@ ?> ]]> </programlisting> - - which prepares and executes the following query: - + Die folgende Abfrage wird erzeugt und ausgeführt: <programlisting role="sql"> <![CDATA[ UPDATE user SET name='Fabien', country='France' @@ -231,18 +219,12 @@ </programlisting> </para> - <para> - Be careful, if you don't specify any <command>WHERE</command> - statement, all the records - of the table will be updated. - </para> - <warning> <para> - The values passed in <parameter>$data</parameter> must be literals. - Do not submit SQL functions (for example <literal>CURDATE()</literal>). - SQL functions that should be performed at execution time need - to be put in the prepared statement. + Die übergebene Werte müssen Literale sein. Übergebene Sie keine + SQL-Funktionen, wie z.B. <command>CURDATE()</command>. + SQL-Funktionen, die zur Laufzeit aufgerufen werden sollen, + müssen sich in der zu präparierenden Anfrage befinden. </para> </warning>
http://cvs.php.net/diff.php/peardoc/de/package/database/db/intro-auto.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/de/package/database/db/intro-auto.xml diff -u peardoc/de/package/database/db/intro-auto.xml:1.1 peardoc/de/package/database/db/intro-auto.xml:1.2 --- peardoc/de/package/database/db/intro-auto.xml:1.1 Wed Mar 30 12:16:10 2005 +++ peardoc/de/package/database/db/intro-auto.xml Wed Mar 30 17:16:46 2005 @@ -1,32 +1,31 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.database.db.intro-auto"> <refnamediv> - <refname>Introduction - autoPrepare & autoExecute</refname> - <refpurpose>Automatically prepare and execute SQL statements</refpurpose> + <refname>Einführung - autoPrepare & autoExecute</refname> + <refpurpose>Automatische Vorbereitung und Ausführung von SQL-Anweisungen</refpurpose> </refnamediv> <refsect1 id="package.database.db.intro-auto.desc"> &title.desc; <refsect2> - <title>Purpose</title> + <title>Zweck</title> <para> <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> and + <function>autoPrepare</function></link> und <link linkend="package.database.db.db-common.autoexecute"> <function>autoExecute</function></link> - reduce the need to write boring - <command>INSERT</command> or <command>UPDATE</command> - SQL queries which are difficult to maintain when you - add a field for instance. + verringern den Aufwand langweilige + <command>INSERT</command> oder <command>UPDATE</command>-SQL-Abfragen + zu schreiben, welche schwer zu pflegen sind, wenn z.B. + eine neue Spalte ergänzt wird. </para> <para> - Imagine you have a 'user' table with 3 fields - (id, name and country). - You have to write sql queries like: - + Nehmen wir an, dass Sie eine Tabelle <userinput>user</userinput> + mit 3 Spalten (<userinput>id</userinput>,<userinput>name</userinput> und <userinput>country</userinput>) benutzen. + Dann müssten Sie Anweisungen schreiben wie: <programlisting role="sql"> <![CDATA[ INSERT INTO table (id, name, country) VALUES (?, ?, ?) @@ -34,19 +33,19 @@ ]]> </programlisting> - If you add a field ('birthYear' for example), you have to rewrite your - queries which is boring and can lead to bugs (if you forget one query for - instance). + Wenn Sie ein Feld hinzufügen (z.B. <userinput>birthYear</userinput>), dann müssen + alle entsprechenden Anfragen umgeschrieben werden. Eine langweilige Sache + und fehleranfällig, wenn man eine im Quelltext übersieht. </para> </refsect2> <refsect2> <title>autoPrepare</title> <para> - With <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link>, you don't have to write your - insert or update queries. For example: - + Mit <link linkend="package.database.db.db-common.autoprepare"> + <function>autoPrepare</function></link> müssen Sie keine + <command>INSERT</command> oder <command>UPDATE</command>-SQL-Abfragen + mehr schreiben. Z.B.: <programlisting role="php"> <![CDATA[ <?php @@ -63,26 +62,23 @@ ?> ]]> </programlisting> - - In this example, <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> will build the following SQL query: - + In diesem Beispiel erzeugt <link linkend="package.database.db.db-common.autoprepare"> + <function>autoPrepare</function></link> die folgende SQL-Abfrage: <programlisting role="sql"> <![CDATA[ INSERT INTO user (id, name, country) VALUES (?, ?, ?) ]]> </programlisting> - - And then, it will call <link linkend="package.database.db.db-common.prepare"> - <function>prepare</function></link> with it. + Mit dieser Abfrage wird <link linkend="package.database.db.db-common.prepare"> + <function>prepare</function></link> aufgerufen. </para> <para> - To add records, you have - to use <link linkend="package.database.db.db-common.execute"> - <function>execute</function></link> or <link + Um Datensätze einzufügen, müssen Sie die + <link linkend="package.database.db.db-common.execute"> + <function>execute</function></link>- oder <link linkend="package.database.db.db-common.executemultiple"> - <function>executeMultiple</function></link> like: + <function>executeMultiple</function></link>-Methode aufrufen: <programlisting role="php"> <![CDATA[ @@ -98,11 +94,8 @@ ?> ]]> </programlisting> - - So, you don't have to write any SQL <command>INSERT</command> - queries! And it works with <command>UPDATE</command> - queries too. For flexibility reasons, you have only to write - the <command>WHERE</command> clause of the query. For instance: + Genauso funktioniert es auch mit <command>UPDATE</command>-Abfragen. + Sie müssen für diesen Fall lediglich die <command>WHERE</command>-Klausel formulieren: <programlisting role="php"> <![CDATA[ @@ -129,7 +122,7 @@ </programlisting> <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> will build the following query: + <function>autoPrepare</function></link> wird die folgende Abfrage bauen: <programlisting role="sql"> <![CDATA[ @@ -137,34 +130,33 @@ ]]> </programlisting> - Then, it will call <link linkend="package.database.db.db-common.prepare"> - <function>prepare</function></link> with it. + Auch hier ruft es mit der erzeugten Abfrage die + <function>prepare</function></link>-Methode auf. </para> <para> - Be careful, if you don't specify any <command>WHERE</command> - clause, all the records - of the table will be updated. + Definieren Sie keine <command>WHERE</command>-Klausel + werden alle Datensätze der Tabelle geändert! </para> </refsect2> <refsect2> <title>autoExecute</title> <para> - Using <link linkend="package.database.db.db-common.autoexecute"> - <function>autoExecute</function></link> is the easiest way - to do insert or update queries. It is a mix of <link + <link linkend="package.database.db.db-common.autoexecute"> + <function>autoExecute</function></link> ist der schnellste Weg, + um <command>INSERT</command> oder <command>UPDATE</command>-Abfragen + durchzuführen. Es ist eine Kombination aus <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> and <link + <function>autoPrepare</function></link> und <link linkend="package.database.db.db-common.autoprepare"> <function>execute</function></link>. </para> <para> - You only need an associative array (key => value) where keys are fields - names and values are corresponding values of these fields. - For instance: - + Sie benötigen nur ein assoziatives Array (Schlüssel => Wert). + Als Schlüssel dienen die Spaltenbezeichnungen und als deren Wert die einzutragenden + Werte. <programlisting role="php"> <![CDATA[ <?php @@ -186,9 +178,7 @@ ?> ]]> </programlisting> - - And that's all! The following query is built and executed: - + Damit wird die folgende Abfrage erzeugt und ausgeführt: <programlisting role="sql"> <![CDATA[ INSERT INTO user (id, name, country) @@ -198,7 +188,7 @@ </para> <para> - And it's the same thing for <command>UPDATE</command> queries: + Analog laufen <command>UPDATE</command>-Abfragen ab: <programlisting role="php"> <![CDATA[ @@ -220,9 +210,7 @@ ?> ]]> </programlisting> - - which prepares and executes the following query: - + Die folgende Abfrage wird erzeugt und ausgeführt: <programlisting role="sql"> <![CDATA[ UPDATE user SET name='Fabien', country='France' @@ -231,18 +219,12 @@ </programlisting> </para> - <para> - Be careful, if you don't specify any <command>WHERE</command> - statement, all the records - of the table will be updated. - </para> - <warning> <para> - The values passed in <parameter>$data</parameter> must be literals. - Do not submit SQL functions (for example <literal>CURDATE()</literal>). - SQL functions that should be performed at execution time need - to be put in the prepared statement. + Die übergebene Werte müssen Literale sein. Übergebene Sie keine + SQL-Funktionen, wie z.B. <command>CURDATE()</command>. + SQL-Funktionen, die zur Laufzeit aufgerufen werden sollen, + müssen sich in der zu präparierenden Anfrage befinden. </para> </warning>