I'm confused (ODBC on NT 4.0 and IIS)
| From: | Charles & Jennifer Jones | Date: | Thu, 27 Jul 2000 15:29:34 +0000 |
| Subject: | I'm confused (ODBC on NT 4.0 and IIS) | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-1576@lists.php.net to get a copy of this message | ||
I'm using PHP 4.0.1 pl2 on Windows NT 4.0 build 1381 with the standard
Win32 ODBC driver
I'm confused because things don't seem to be working like I'm expecting,
and my documentation ain't clearing it up :-/
I try to execute this query:
select ts_cases.ts_issueid, ts_cases.ts_severity,
ts_cases.ts_title, ts_cases.ts_description from ts_cases
where ts_cases.ts_issueid = "00703"
and I get an error:
SQL error:
[Microsoft]
[ODBC SQL Server Driver]
[SQL Server]Invalid column name '00703'.,
SQL state S0022 in SQLExecDirect
in e:\Web\PHP\reports\open_defects.php on line 47
So I change the " to ':
select ts_cases.ts_issueid, ts_cases.ts_severity,
ts_cases.ts_title, ts_cases.ts_description from ts_cases
where ts_cases.ts_issueid = '00703'
And I get no rows returned, but if I say:
select ts_cases.ts_issueid, ts_cases.ts_severity,
ts_cases.ts_title, ts_cases.ts_description from ts_cases
where ts_cases.ts_issueid like '0070%'
Then *poof*, there is what I'm looking for, 00703 right in the list!
Why can't I use double quotes in the query? (I *was* escaping them with
\) Why doesn't the direct comparison grab any rows when the wildcard
plainly shows it existing in the database?
Oh, if I issue any of the above commands in the ISQL/w application then
it returns the result I'm expecting.
Thanks for any insight you can provide!
CharlesJ
--
===========================================================
Works at HP, doesn't | Charles Jones
speak for HP | Hewlett-Packard Company - CPSS
| Loveland, Colorado, USA