Re: MS access selet WHERE problem

From: Date: Fri, 15 Dec 2000 04:27:33 +0000
Subject: Re: MS access selet WHERE problem
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-4484@lists.php.net to get a copy of this message
Probably something that was commented here some weeks ago: "group" must be a reserved word. Try enclosing it in square brackets, like: $odbc_string = "select san,longdesc from matmap where [group] ='$matgroup'" Gonzalo. > Hi all > This is probably asked alot but I have looked around and can't find what I > am doing wrong > Can anyone help please. > 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 ... > Any suggestions? > If I remove the WHERE part everything works fine.

« previous php.windows (#4484) next »