adding an example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@137944 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2003-08-16 09:37:55 +00:00
parent 0a825c9ee4
commit f08927c92c

View file

@ -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>
@ -30,6 +30,24 @@
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
<function>mysql_connect</function>,