RE: Re[2]: [PHP-WIN] php access query problem
| From: | Bikes | Date: | Sun, 11 Feb 2001 08:13:37 +0000 |
| Subject: | RE: Re[2]: [PHP-WIN] php access query problem | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-5498@lists.php.net to get a copy of this message | ||
I think you should also use mysql, for guaranteed interoperability with php.
But meanwhile, just keep playing around with the quotes ' and " .
Bikes
-----Original Message-----
From: Gonzalo Vera
To: aaron
Cc: php-windows@lists.php.net
Sent: 2/9/01 8:45 PM
Subject: Re[2]: [PHP-WIN] php access query problem
At least in older versions of access it's better to enclose field
names in square brackets, like
"SELECT Location, [Dept ID], [Equip Type] FROM Equipment01 WHERE
Location = '415C' AND [Equip Type] = 'C'"
Also, shouldn't you end with a semicolon? The weird thing here is that
it worked before. Sorry if I can't get any farther, I'm just switching
from access 95 to MySQL (bye bye MS), and in access 95 those would be
troublesome issues.
Gonzalo.
> Access 2000 on IIS 4.0
> "Gonzalo Vera" <gvz@eucalipto.net> wrote in message
> news:627380912.20010208164816@eucalipto.net...
> What DB are you using?
> Gonzalo.
>> I have the query
>> $cur= odbc_exec( $cnx, "SELECT Location, 'Dept ID', 'Equip Type'
>> FROM
>> Equipment01 WHERE Location = '415C'");
>> which returns the proper results but when I add AND 'Equip Type' =
'C' to
>> the end of it I get no results. Is my syntax correct? Thanks, Aaron
>> $cur= odbc_exec( $cnx, "SELECT Location, 'Dept ID', 'Equip Type'
>> FROM
>> Equipment01 WHERE Location = '415C' AND 'Equip Type' =
>> 'C'");
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
php-list-admin@lists.php.net
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net