Re: PHP/MS Access Help

From: Date: Thu, 25 May 2000 14:00:28 +0000
Subject: Re: PHP/MS Access Help
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-88@lists.php.net to get a copy of this message
hi there, when u define an ODBC driver (usually via the control panel) you already specify the database you will work with, thus you don;t need to select a database in the script, remove that line. If the ODBC driver is set correctly you will be connected to the database you need so you will have to run the query. Good luck! David ----- Original Message ----- From: Tim Hulen <thulen@yahoo.com> To: <php-db@lists.php.net> Sent: Thursday, May 25, 2000 4:27 PM Subject: [PHP-DB] PHP/MS Access Help > This script creates an error. Fatal error: Call to > unsupported or undefined function odbc_select_db(). > > Is the select_db not available? I'm using PHP3 and MS > Access. I looked through PHP documentation and I > can't find odbc_select_db. Here the rest of my code. > > <html> > <body> > > <?php > $db = odbc_connect("dive","",""); > > odbc_select_db("mydb",$db); > $result = odbc_query("SELECT * FROM tblDiveData",$db); > echo "<table border=1>\n"; > echo "<tr><td>Dive Number</td>Dive<td></tr>\n"; > while ($myrow = odbc_fetch_row($result)) > { > printf("<tr><td>%s %s</td><td>%s</td></tr>\n", > $myrow[1], $myrow[2], $myrow[3]); > } > echo "</table>\n"; > ?> > > </body> > </html> > > If anyone can find a problem or fix please let me > know. > > Tim > > > ===== > "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!? > Kick off your party with Yahoo! Invites. > http://invites.yahoo.com/ > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#88) next »