Re: Help...

From: Date: Fri, 02 Jun 2000 00:18:29 +0000
Subject: Re: Help...
Groups: php.db 
Request: Send a blank email to php-db+get-164@lists.php.net to get a copy of this message
That is what I thought, but I get this error>? Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'DiveDepth ='., SQL state 37000 in SQLExecDirect in C:\WEBSHARE\WWWROOT\php\divedepthq.php on line 26 --- Matt McClanahan <cardinal@dodds.net> wrote: > On Thu, 1 Jun 2000, Tim Hulen wrote: > > > I'm new to PHP and trying various test to > demonstrate > > to other the power of PHP. I also need to find a > book > > that has some good documentation for reference > > especially when dealing with ODBC databases. > > > > I this example how do I pass foo to my query as an > > integer instead of a string, do I can use the <,> > as > > part of the where statement. > > > > <?php > > $db = ODBC_Connect("dive", "", ""); > > $res = ODBC_Exec($db, "SELECT * FROM > tblDiveData > > WHERE DiveDepth >= '$foo'"); > > I think if you just take the quotes off of $foo, > then SQL will consider it > an integer. > > E.g, $res = ODBC_Exec($db, "SELECT * FROM > tblDiveData WHWERE DiveDepth >= > $foo"); > > Matt > ===== "Hokey religions and ancient weapons can never compare to a good blaster at your side, Kid." May all your bubbles be external. __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/

« previous php.db (#164) next »