mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
use mysql_db_query in the example
# per user note git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@246771 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c50a926d77
commit
f3bd19c5a8
1 changed files with 2 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<refentry xml:id="function.mysql-db-query" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mysql_db_query</refname>
|
||||
|
@ -95,13 +95,8 @@ if (!$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')) {
|
|||
exit;
|
||||
}
|
||||
|
||||
if (!mysql_select_db('mysql_dbname', $link)) {
|
||||
echo 'Could not select database';
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = 'SELECT foo FROM bar WHERE id = 42';
|
||||
$result = mysql_query($sql, $link);
|
||||
$result = mysql_db_query('mysql_dbname', $sql, $link);
|
||||
|
||||
if (!$result) {
|
||||
echo "DB Error, could not query the database\n";
|
||||
|
|
Loading…
Reference in a new issue