From 89320e7fa5055b9fc49ad1711a7aba3e8726fbe7 Mon Sep 17 00:00:00 2001 From: Tom Sommer Date: Fri, 10 Sep 2004 18:24:47 +0000 Subject: [PATCH] Bug #30055 - Incorrect example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@168330 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mysql/functions/mysql-field-name.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/mysql/functions/mysql-field-name.xml b/reference/mysql/functions/mysql-field-name.xml index 7ed2d63a8f..eed622ce70 100644 --- a/reference/mysql/functions/mysql-field-name.xml +++ b/reference/mysql/functions/mysql-field-name.xml @@ -1,5 +1,5 @@ - + @@ -42,9 +42,9 @@ * username * password. */ -$link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); -if (!$db_selected) { - die('Could not set $dbname: ' . mysql_error()); +$link = @mysql_connect('localhost', 'mysql_user', 'mysql_password'); +if (!$link) { + die('Could not connect to MySQL server: ' . mysql_error()); } $dbname = 'mydb'; $db_selected = mysql_select_db($dbname, $link);