cvs: peardoc /en/package/database/db intro-auto.xml

From: Date: Tue, 30 Mar 2004 00:40:47 +0000
Subject: cvs: peardoc /en/package/database/db intro-auto.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-3136@lists.php.net to get a copy of this message
danielc Mon Mar 29 19:40:47 2004 EDT Modified files: /peardoc/en/package/database/db intro-auto.xml Log: Remove spaces between words and punctuation. http://cvs.php.net/diff.php/peardoc/en/package/database/db/intro-auto.xml?r1=1.14&r2=1.15&ty=u Index: peardoc/en/package/database/db/intro-auto.xml diff -u peardoc/en/package/database/db/intro-auto.xml:1.14 peardoc/en/package/database/db/intro-auto.xml:1.15 --- peardoc/en/package/database/db/intro-auto.xml:1.14 Mon Mar 29 19:39:27 2004 +++ peardoc/en/package/database/db/intro-auto.xml Mon Mar 29 19:40:47 2004 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.14 $ --> +<!-- $Revision: 1.15 $ --> <refentry id="package.database.db.intro-auto"> <refnamediv> <refname>Introduction - autoPrepare &amp; autoExecute</refname> @@ -19,7 +19,7 @@ </para> <para> Imagine you have an 'user' table with 3 fields (id, name and country). - You have to write sql queries like : + You have to write sql queries like: <programlisting role="sql"> <![CDATA[ INSERT INTO table (id, name, country) VALUES (?, ?, ?) @@ -36,7 +36,7 @@ <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 : + insert or update queries. For example: <programlisting role="php"> <![CDATA[ // Once you have a valid DB object named $db... @@ -46,7 +46,7 @@ ]]> </programlisting> In this example, <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> will build the following sql query : + <function>autoPrepare</function></link> will build the following sql query: <programlisting role="sql"> <![CDATA[ INSERT INTO user (id, name, country) VALUES (?, ?, ?) @@ -56,7 +56,7 @@ <function>prepare</function></link> with it. To add records, you have so to use <link linkend="package.database.db.db-common.execute"> <function>execute</function></link> or <link linkend="package.database.db.db-common.executemultiple"> - <function>executeMultiple</function></link> like : + <function>executeMultiple</function></link> like: <programlisting role="php"> <![CDATA[ // Once you have a valid DB object named $db... @@ -67,7 +67,7 @@ $db->execute($sth, $table_values); ]]> </programlisting> - So, you don't have to write any sql insert queries ! But it works with + So, you don't have to write any sql insert queries! But it works with update queries too. For flexibility reasons, you have only to write the WHERE statement of the query. For instance: <programlisting role="php"> @@ -82,7 +82,7 @@ ]]> </programlisting> <link linkend="package.database.db.db-common.autoprepare"> - <function>autoPrepare</function></link> will build the following query : + <function>autoPrepare</function></link> will build the following query: <programlisting role="sql"> <![CDATA[ UPDATE user SET name=?, country=? WHERE id=1 @@ -120,7 +120,7 @@ $db->autoExecute($table_name, $fields_values, DB_AUTOQUERY_INSERT); ]]> </programlisting> - And that's all ! The following query is built and executed : + And that's all! The following query is built and executed: <programlisting role="sql"> <![CDATA[ @@ -128,7 +128,7 @@ VALUES (1, 'Fabien', 'France') ]]> </programlisting> - And it's the same thing for update queries : + And it's the same thing for update queries: <programlisting role="php"> <![CDATA[ // Once you have a valid DB object named $db... @@ -141,7 +141,7 @@ DB_AUTOQUERY_UPDATE, 'id = 1'); ]]> </programlisting> - The following query is built and executed : + The following query is built and executed: <programlisting role="sql"> <![CDATA[ UPDATE user SET name='Fabien', country='France'

« previous php.pear.doc (#3136) next »