georg           Sun Apr 21 13:18:18 2002 EDT

  Modified files:              
    /phpdoc/en/reference/mysql/functions        mysql-insert-id.xml 
  Log:
  added samples
  added seealso
  
  
Index: phpdoc/en/reference/mysql/functions/mysql-insert-id.xml
diff -u phpdoc/en/reference/mysql/functions/mysql-insert-id.xml:1.2 
phpdoc/en/reference/mysql/functions/mysql-insert-id.xml:1.3
--- phpdoc/en/reference/mysql/functions/mysql-insert-id.xml:1.2 Wed Apr 17 02:41:12 
2002
+++ phpdoc/en/reference/mysql/functions/mysql-insert-id.xml     Sun Apr 21 13:18:18 
+2002
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
 <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
   <refentry id="function.mysql-insert-id">
    <refnamediv>
@@ -50,6 +50,24 @@
       <literal>LAST_INSERT_ID()</literal> in an SQL query.
      </para>
     </warning>
+    <example>
+     <title>mysql_insert_id Example</title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+    mysql_connect("localhost", "mysql_user", "mysql_password") or
+        die("could not connect");
+    mysql_select_db("mydb");
+
+    mysql_query("INSERT INTO mytable (product) values ('kossu');
+    printf ("Last inserted record has id %d\n", mysql_insert_id());
+?>
+]]>
+     </programlisting>
+    </example>
+    <para>
+     See also: <function>mysql_query</function>.
+    </para>
    </refsect1>
   </refentry>
 


Reply via email to