#46472 [Opn->Csd]: Broken example in function mssql_get_last_message

From: Date: Mon, 03 Nov 2008 16:08:21 +0000
Subject: #46472 [Opn->Csd]: Broken example in function mssql_get_last_message
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1305@lists.php.net to get a copy of this message
ID: 46472 Updated by: rquadling@php.net Reported By: n dot richthof at itcampus dot eu -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2008-11-03 15:03:45] n dot richthof at itcampus dot eu Description: ------------ The example reads: Example #1 mssql_get_last_message() example <?php // Connect to MSSQL mssql_connect('KALLESPC\SQLEXPRESS', 'sa', 'phpfi'); mssql_select_db('php'); // Make a query that will fail $query = @mssql_query('SELECT * FROM [php].[dbo].[not-found]'); if(!$query) { // The query has failed, print a nice error message // using mssql_get_last_message() die('MSSQL error: ' . mssql_get_last_error()); } ?> The line die('MSSQL error: ' . mssql_get_last_error()); should be die('MSSQL error: ' . mssql_get_last_message()); Reproduce code: --------------- Check http://www.php.net/manual/en/function.mssql-get-last-message.php ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46472&edit=1

« previous php.doc.bugs (#1305) next »