Jump to content

PHP-ODBC keeps failing when I try to execute select statement!


someguy321

Recommended Posts

I'm able to use PHP-ODBC to read the tables in an MDB file, as well as the column names on the tables. But when I try to read data from a particular table, it fails (I don't get an error, instead the browser pops up a message asking if I want to save the file "mdbtest.php" which is 0 bytes in size)! Any idea what's wrong?

 

//THIS WORKS
$conn = odbc_connect( 'TestDB', '', '' );
if ( !$conn) exit("Connection Failed: " . $conn);

//STILL FINE HERE
$sql = 'SELECT * FROM Customers';

//INCLUDING THIS LINE OF CODE CAUSES THE PROBLEM
$rs = odbc_exec( $conn, $sql );

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.