RE: [PHP-DB] MSSQL: Spaces in database name

From: Date: Thu, 09 Aug 2001 03:19:27 +0000
Subject: RE: [PHP-DB] MSSQL: Spaces in database name
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-11151@lists.php.net to get a copy of this message
Quoting "Robert D. Young" <Robert@AbilitySys.com>: > That did it! Using: > > <... stuff > > $dbname = "[Test Database]"; > <... more stuff > > mssql_select_db($dbname); > > worked perfectly. Again, Thanks! This is standard Microsoft (and maybe ODBC?) syntax. Using square brackets will work on most things including table names and field names with spaces in them. This will work fine SELECT [table space].[field space] FROM [table space] It doesn't mean that you should go around putting spaces in your database objects. That's never a good idea :) Cheers, Graeme

« previous php.db (#11151) next »