Re: MS access selet WHERE problem
| From: | Webmaster | Date: | Fri, 15 Dec 2000 09:00:42 +0000 |
| Subject: | Re: MS access selet WHERE problem | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4486@lists.php.net to get a copy of this message | ||
>
> The code I am using is
> $odbc_string = "select san,longdesc from matmap where group =
'$matgroup'";
> echo $odbc_string;
> $cur = odbc_exec($cnx, $obdc_string);
>
> group is a text field in an Access database
>
> When i run it I get...
> select san,longdesc from matmap where group = 'brt_plis'
> Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax
> error in WHERE clause., SQL state 37000 in SQLExecDirect in ...
Try taking out the spaces (eg. select san,longdesc from matmap where
group='brt_plis'; ), they've always caused problem with the ODBC Access
driver for me.
On the lighter side, we're dumping the WindowsNT machines and converting
everything from ASP to PHP. Yay :)
--
Rick Hodger
WebMaster @ DomainsBuy.com