Help...

From: Date: Thu, 01 Jun 2000 22:54:35 +0000
Subject: Help...
Groups: php.db 
Request: Send a blank email to php-db+get-159@lists.php.net to get a copy of this message
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. Thanks, Tim <? if(!isset($submit)){ ?> <form> <form method=post action='page.php3'> <input type='text' name='foo'> <input type='submit' name='submit' value='Search'> </form> <? } else { } ?> int settype(foo, integer type); <table border=0><td width=105><td width=190><td width=90><td width=88><td width=93> <TR><TD><B><CENTER> Dive Location</CENTER></B></TD> <TD><B><CENTER> Dive Site</CENTER></B></TD> <TD><B><CENTER> Dive Buddy</CENTER></B></TD> <TD><B><CENTER> Dive Depth</CENTER></B></TD> <TD><B><CENTER> Bottom Time</CENTER></B></TD></TR></B> <?php $db = ODBC_Connect("dive", "", ""); $res = ODBC_Exec($db, "SELECT * FROM tblDiveData WHERE DiveDepth >= '$foo'"); while (ODBC_Fetch_Row($res)) { echo "<table border=0><td width=107><td width=192><td width=90><td width=88><td width=93>\n"; echo "<TR><TD><CENTER>".ODBC_Result($res, 'DiveLocation')."</CENTER></TD>", "<TD><CENTER>".ODBC_Result($res, 'DiveSite')."</CENTER></TD>", "<TD><CENTER>".ODBC_Result($res, 'DiveBuddy')."</CENTER></TD>", "<TD><CENTER>".ODBC_Result($res, 'DiveDepth')."</CENTER></TD>", "<TD><CENTER>".ODBC_Result($res, 'BottomTime')."</CENTER></TD>","</TR>"; } ODBC_Free_Result($res); ?> ===== "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 (#159) next »