Click to See Complete Forum and Search --> : Please Help Me - Problem With Table Name in MSSQL Server 2000


baltazhor200401
04-26-2007, 01:46 AM
Hi Guys,
I use PHP 4.3.11, and succesfully connected to MS SQL Server 2000. The problem is, the table name is PT DATASCRIP$Service Item Line of course PHP recognize the table name as a variable because the $, or worst, describe it as an error.

Do you have any idea how to fix this, because 100% impossible to change the table name, because it will break down more than 5 Application, and if i have to copy to another table, the data is to large.

Can PHP read PT DATASCRIP$Service Item Line as a table name ?

Please Help Me :(

Thank You and I Really appreciate your answer

NogDog
04-26-2007, 02:06 AM
Either put the name in single quotes so that there is no variable interpolation, or if you must use double quotes then escape the $ with a back-slash: \$

baltazhor200401
04-26-2007, 05:50 AM
I already try but still error. the space within the table name make it still error ... any idea ?

NogDog
04-26-2007, 07:10 AM
I think you can use square brackets to "quote" column names in MSSQL, e.g.: [column name].

s.b37
04-26-2007, 07:31 AM
if nogdog's doesn't work:
can you urlencode ie: " " becomes %20
just a suggestion, prob won't work

baltazhor200401
04-26-2007, 09:16 PM
Thank's for the reply, especially NogDog, i use [] and it's work perfectly