cvs: phpdoc /en/reference/mysql/functions mysql-db-query.xml
| From: | Nuno Lopes | Date: | Fri, 23 Nov 2007 18:56:56 +0000 |
| Subject: | cvs: phpdoc /en/reference/mysql/functions mysql-db-query.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-434@lists.php.net to get a copy of this message | ||
nlopess Fri Nov 23 18:56:56 2007 UTC
Modified files:
/phpdoc/en/reference/mysql/functions mysql-db-query.xml
Log:
revert my previous commit, per Philip comment
# I didnt really noticed the example title, sorry
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/mysql/functions/mysql-db-query.xml?r1=1.13&r2=1.14&diff_format=u
Index: phpdoc/en/reference/mysql/functions/mysql-db-query.xml
diff -u phpdoc/en/reference/mysql/functions/mysql-db-query.xml:1.13
phpdoc/en/reference/mysql/functions/mysql-db-query.xml:1.14
--- phpdoc/en/reference/mysql/functions/mysql-db-query.xml:1.13 Thu Nov 22 22:47:31 2007
+++ phpdoc/en/reference/mysql/functions/mysql-db-query.xml Fri Nov 23 18:56:56 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.13 $ -->
+<!-- $Revision: 1.14 $ -->
<refentry xml:id="function.mysql-db-query" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mysql_db_query</refname>
@@ -95,8 +95,13 @@
exit;
}
+if (!mysql_select_db('mysql_dbname', $link)) {
+ echo 'Could not select database';
+ exit;
+}
+
$sql = 'SELECT foo FROM bar WHERE id = 42';
-$result = mysql_db_query('mysql_dbname', $sql, $link);
+$result = mysql_query($sql, $link);
if (!$result) {
echo "DB Error, could not query the database\n";