Re: Help...

From: Date: Thu, 01 Jun 2000 23:57:39 +0000
Subject: Re: Help...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-163@lists.php.net to get a copy of this message
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

« previous php.db (#163) next »