Skip to content

Instantly share code, notes, and snippets.

@nicelife90
Created October 5, 2017 20:09
Show Gist options
  • Save nicelife90/76f00fcbd79e299934b301fc59891799 to your computer and use it in GitHub Desktop.
Save nicelife90/76f00fcbd79e299934b301fc59891799 to your computer and use it in GitHub Desktop.
Acomba ODBC - PHP Query
<?php
$dbq = "Driver={Acomba ODBC Driver};AcombaExe=C:\Users\ylafontaine\Desktop\Acomba;Dbq=\\\AD-FS01\acomba\F1000.DTA\Addison";
$conn = odbc_connect($dbq, "USER", "PASS");
if (!$conn) {
echo "Erreur au niveau de la connexion !!<br>";
}
else {
odbc_exec($conn, "BEGIN_TRANSACTION_IN");
$req = "SELECT * FROM Customer";
$data = odbc_exec($conn, $req);
echo "<pre>";
while ($row = odbc_fetch_object($data)) {
print_r($row);
}
odbc_exec($conn, "END_TRANSACTION_IN");
odbc_close($conn);
}
@alexjeen
Copy link

Thanks :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment