RE: [PHP-DB] Tablename issue..
| From: | Ryan Marrs | Date: | Thu, 30 Aug 2001 22:35:19 +0000 |
| Subject: | RE: [PHP-DB] Tablename issue.. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-12003@lists.php.net to get a copy of this message | ||
What about using a view?
(Not entirely sure if Oracle supports them, but I don't see why not)
Ryan
-----Original Message-----
From: Tom Wallace [mailto:twallace@iss.net]
Sent: Wednesday, August 29, 2001 5:13 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Tablename issue..
Tried this - same errors -- Also tried the following permutations
(courtesy of Trevor Lanyon) --
You can try to encapsulate the table name with hard bracket
[Table - Name]
You can escape the character with a slash (I don't think this will work):
Table\ \- Name
You can escape the characters with the hexidecimal url encoding (I know this
only to work with one try of database, and I think the client is actually
stripping it off)
Table%20%2D%20Name
****
The ODBC source I'm trying to connect to is a Remedy (Action Request System)
4.5 system running on top of a Oracle 8 database.
Thanks - Tom
"Ryan Marrs" <rmarrs@strtrade.com> wrote in message
news:EA9290E62E6CD311859200805F85164902FB13DE@EXCHANGE...
> Try putting Brackets [] around the spaces. This will typically fix the
> problem, ie:
>
> $sql2 = odbc_exec($conn,"SELECT [Character Field] FROM [ABC - Table]");
>
> Let me know if it works!
>
> Ryan
>
> -----Original Message-----
> From: Tom Wallace [mailto:twallace@iss.net]
> Sent: Wednesday, August 29, 2001 3:06 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Tablename issue..
>
> Hola,
>
> I'm having a difficult time figuring out the syntax here -- my table
name
> has spaces & dashes in it..Unfortunately I can't permanently change the
> tablename.. I've tried a half dozen different ways to access the table,
each
> return an error similar to this:
>
> Warning: SQL error: [ISAM]No data found, SQL state S00 in SQLExecDirect in
> c:\inetpub\wwwroot\test8.php on line 14
>
> but removing the spaces from the tablename and updating the php fixes it..
>
> any ideas?
>
> $sql2 = odbc_exec($conn,"SELECT Character_Field FROM ABC - Table");
>
> Thanks,
> -Tom
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net