php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8679 mssql_xxx can't handle databases and tables that start with numbers
Submitted: 2001-01-12 12:11 UTC Modified: 2001-01-12 12:41 UTC
From: h dot radi at nme dot at Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.0.4 OS: win2k , linux
Private report: No CVE-ID: None
 [2001-01-12 12:11 UTC] h dot radi at nme dot at
here is the errormessage

on win:

Warning: MS SQL message: Line 1: Incorrect syntax near '123'. (severity 15) in CDatabaseMSSQL.inc on line 53

Warning: MS SQL: Unable to select database: 123test in CDatabaseMSSQL.inc on line 53


on linux:

mssql_select_db("100BASE",$spojeni) nebo [sybase_select_db... ]  :
Warning: Sybase error: Line 1: Incorrect syntax near '100'. (severity 15) in

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-12 12:35 UTC] h dot radi at nme dot at
ok, it is definitly a bug in the mssql libraries, i've written a short sample c program that produces the same output. i'll try to workaround this somehow ...

since it's not a php bug you can close this.



SQL Server message 170, severity 15:
        Line 1: Incorrect syntax near '123'.
DB-LIBRARY error:
        Allgemeiner SQL Server-Fehler: ?berpr?fen Sie Meldungen vom Computer mit SQL Server.
SQL Server message 170, severity 15:
        Line 1: Incorrect syntax near '123'.
DB-LIBRARY error:
        Allgemeiner SQL Server-Fehler: ?berpr?fen Sie Meldungen vom Computer mit SQL Server.
SQL Server message 170, severity 15:
        Line 1: Incorrect syntax near '123'.
DB-LIBRARY error:
        Allgemeiner SQL Server-Fehler: ?berpr?fen Sie Meldungen vom Computer mit SQL Server.
dbsqlexec() failed
 [2001-01-12 12:41 UTC] fmk@php.net
If you use MS Enterprice Manager it is possible to create a atabase called 123Test. It is not possible to use Query Analyzer to select the database with the command

use 123Test.

If you select the database as the default database for the userid/password you are using it will be possible to access data in it without the use command (mssql_select_db/sybase_select_db)

You can not create a table called 123Table using Query Analyzer and in general you should always start your names with a letter.
 [2002-04-22 04:31 UTC] bragiba at simi dot is
I installed freetds version 0.53, PHP 4.12 and Apache 
1.2.24 on Redhat Linux 7.2.   In my freetds.conf file I 
set the tds version to 8.0 as I was trying to conenct to 
that version of MSSQL.   I got the following warning:

Warning: Sybase error: Line 1: Incorrect syntax near 
(severity 15) (Bug #8679)

If I simply change my tds version to 7.0 it works.  I am 
not certain that it will work for all queries or 
procedures I need to perform.  But I just need to get some 
very basic stuff out and it is enough for me.

Does anyone know if Msoft will start supporting tds 
version 8.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC