mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 18:38:55 +00:00

- Incooperate user comment about insert/select/delete queries from ceo@l-i-e.com git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@94890 c90b9560-bf6c-de11-be94-00142212c4b1
77 lines
2.7 KiB
XML
77 lines
2.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
|
|
<refentry id="function.mysql-db-query">
|
|
<refnamediv>
|
|
<refname>mysql_db_query</refname>
|
|
<refpurpose>Send a MySQL query</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>resource</type><methodname>mysql_db_query</methodname>
|
|
<methodparam><type>string</type><parameter>database</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
|
<methodparam choice="opt"><type>resource</type><parameter>
|
|
link_identifier
|
|
</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns a positive MySQL result resource to the query result,
|
|
or &false; on error. The function also returns &true;/&false; for
|
|
<literal>INSERT</literal>/<literal>UPDATE</literal>/<literal>DELETE</literal>
|
|
queries to indicate success/failure.
|
|
</para>
|
|
<para>
|
|
<function>mysql_db_query</function> selects a database and
|
|
executes a query on it. If the optional link identifier isn't
|
|
specified, the function will try to find an open link to the
|
|
MySQL server and if no such link is found it'll try to create one
|
|
as if <function>mysql_connect</function> was called with no
|
|
arguments.
|
|
</para>
|
|
<para>
|
|
Be aware that this function does <emphasis role="strong">NOT</emphasis>
|
|
switch back to the database you were connected before. In other words,
|
|
you can't use this function to <emphasis>temporarily</emphasis> run a
|
|
sql query on another database, you would have to manually switch back.
|
|
Users are strongly encouraged to use the
|
|
<literal>database.table</literal> syntax in their sql queries instead of
|
|
this function.
|
|
</para>
|
|
<para>
|
|
See also <function>mysql_connect</function> and
|
|
<function>mysql_query</function>.
|
|
</para>
|
|
<para>
|
|
<note>
|
|
<simpara>
|
|
This function has been deprecated since PHP 4.0.6.
|
|
Do not use this function. Use <function>mysql_select_db</function>
|
|
and <function>mysql_query</function> instead.
|
|
</simpara>
|
|
</note>
|
|
</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
|
|
-->
|