> Two days trying it to get to work with the OBDC driver has been nightmarish.
> I've managed to open a connection but all the queries are just empty.
It might be worth posting an example. I'm not a PHP expert but someone on the list may spot something. Below is a pdo odbc demo I have that does work (using a local connection, note I had to make sure the extension directory and the extension was enabled in the php.ini file). I set the name in the example to "Ingres GP" you can typically use Ingres but if you have multiple installations you may want (like I did) to specify the installation code.
<?php
try {
$dbh = new PDO('odbc:Driver={Ingres GP};Server=(local);Database=iidbdb', '', '');
$sql = "select cap_capability, cap_value from iidbcapabilities";
foreach ($dbh->query($sql) as $row)
{
print $row['cap_capability'] .' - '. $row['cap_value'] . '<br />';
}
$dbh = null;
}
catch(PDOException $e)
{
echo 'Connection failed: ' . $e->getMessage();
}
?>