#46472 [NEW]: Broken example in function mssql_get_last_message
| From: | n dot richthof at itcampus dot eu | Date: | Mon, 03 Nov 2008 15:03:45 +0000 |
| Subject: | #46472 [NEW]: Broken example in function mssql_get_last_message | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-1304@lists.php.net to get a copy of this message | ||
From: n dot richthof at itcampus dot eu
Operating system: Irrelevant
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Broken example in function mssql_get_last_message
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 bug report at http://bugs.php.net/?id=46472&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46472&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46472&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46472&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46472&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46472&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=46472&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46472&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46472&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46472&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46472&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46472&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46472&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46472&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46472&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46472&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46472&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46472&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46472&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46472&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46472&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46472&r=mysqlcfg