Files
php-doc-ru/reference/mysql/functions/mysql-create-db.xml
Hannes Magnusson 245266cba8 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there
 - Bump EN-Revision where appropriate


git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@238337 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-23 13:31:28 +00:00

87 lines
2.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.5 $ -->
<!-- EN-Revision: 1.7 Maintainer: lovchy Status: ready -->
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
<refentry xml:id="function.mysql-create-db" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mysql_create_db</refname>
<refpurpose>Создаёт базу данных MySQL</refpurpose>
</refnamediv>
<refsect1>
<title>Описание</title>
<methodsynopsis>
<type>bool</type><methodname>mysql_create_db</methodname>
<methodparam><type>string</type><parameter>database_name</parameter></methodparam>
<methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam>
</methodsynopsis>
<para>
<function>mysql_create_db</function> пытается создать базу данных на
сервере, на который ссылается переданный указатель.
</para>
<para>
&return.success;
</para>
<para>
<example>
<title>Пример создания базы данных MySQL</title>
<programlisting role="php">
<![CDATA[
<?php
$link = mysql_pconnect("localhost", "mysql_user", "mysql_password")
or die("Could not connect: " . mysql_error());
if (mysql_create_db("my_db")) {
print ("Database created successfully\n");
} else {
printf ("Error creating database: %s\n", mysql_error());
}
?>
]]>
</programlisting>
</example>
</para>
<para>
Для совместимости, как алиас, доступна устаревшая функция <function>mysql_createdb</function>
Однако, использовать её крайне не рекомандуется.
</para>
<note>
<para>
Функция <function>mysql_create_db</function> не рекомендуется к
использованию. Предпочтительнее использовать <function>mysql_query</function> с
SQL-запросов создания базы данных <literal>SQL CREATE DATABASE</literal>.
</para>
</note>
<warning>
<para>
Эта функция недоступна в библиотеке для MySQL версий 4.x.
</para>
</warning>
<para>
См. также
<function>mysql_drop_db</function> и
<function>mysql_query</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->