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 );

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.