didou           Sat Aug 16 05:37:55 2003 EDT

  Modified files:              
    /phpdoc/en/reference/mysql/functions        mysql-select-db.xml 
  Log:
  adding an example
  
Index: phpdoc/en/reference/mysql/functions/mysql-select-db.xml
diff -u phpdoc/en/reference/mysql/functions/mysql-select-db.xml:1.3 
phpdoc/en/reference/mysql/functions/mysql-select-db.xml:1.4
--- phpdoc/en/reference/mysql/functions/mysql-select-db.xml:1.3 Wed Jul  9 11:07:29 
2003
+++ phpdoc/en/reference/mysql/functions/mysql-select-db.xml     Sat Aug 16 05:37:55 
2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
 <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
   <refentry id="function.mysql-select-db">
    <refnamediv>
@@ -29,6 +29,24 @@
     <para>
      Every subsequent call to <function>mysql_query</function> will be
      made on the active database.
+    </para>
+    <para>
+     <example>
+      <title><function>mysql_select_db</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+
+$lnk = mysql_connect('localhost', 'mysql_user', 'mysql_password')
+       or die ('Not connected : ' . mysql_error());
+
+// make foo the current db
+mysql_select_db('foo', $lnk) or die ('Can\'t use foo : ' . mysql_error());
+
+?>
+]]>
+      </programlisting>
+     </example>
     </para>
     <para>
      See also



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to