|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-05 16:48 UTC] fmk@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 19:00:01 2025 UTC |
Description: ------------ The mssql_select_db function does not accept any whitespaces in the database name string nor decimal numbers at the front. If I replace the whitespaces with something else (like _) and cut the numbers out or let them trail the string, no error occurs and the command is performed correctly. The code line given in the error messages at the bottom of this page, are actually in the PEAR::MDB package. I located the line in the source code: if(!mssql_select_db($this->database_name, $this->connection)) { return($this->mssqlRaiseError()); } Reproduce code: --------------- $dbDatabase = "030616 td@demo mhe"; // or $dbDatabase = "td@demo mhe 030616"; mssql_select_db($dbDatabase); // Connection to DBMS server was already made successfully Expected result: ---------------- I'd expect no error message which means a successfully selected database. Actual result: -------------- // Error message Warning: mssql_select_db(): message: Zeile 1: Falsche Syntax in der N?he von '030616'. (severity 15) in C:\PHP\pear\MDB\mssql.php on line 417 // and for the second example Warning: mssql_select_db(): message: Zeile 1: Falsche Syntax in der N?he von 'mhe'. (severity 15) in C:\PHP\pear\MDB\mssql.php on line 417 In both examples the error occurs when calling mssql_select_db (see description on top of this page for the source code line).