PageRenderTime 43ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/libraries/adodb.493a/tests/test2.php

https://github.com/guzzisto/retrospect-gds
PHP | 26 lines | 18 code | 7 blank | 1 comment | 1 complexity | 384bf94f1e4a9ab57dd0808030ba021c MD5 | raw file
Possible License(s): AGPL-1.0, LGPL-2.1
  1. <?php
  2. // BASIC ADO test
  3. include_once('../adodb.inc.php');
  4. $db = &ADONewConnection("ado_access");
  5. $db->debug=1;
  6. $access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
  7. $myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
  8. . 'DATA SOURCE=' . $access . ';';
  9. echo "<p>PHP ",PHP_VERSION,"</p>";
  10. $db->Connect($myDSN) || die('fail');
  11. print_r($db->ServerInfo());
  12. try {
  13. $rs = $db->Execute("select $db->sysTimeStamp,* from adoxyz where id>02xx");
  14. print_r($rs->fields);
  15. } catch(exception $e) {
  16. print_r($e);
  17. echo "<p> Date m/d/Y =",$db->UserDate($rs->fields[4],'m/d/Y');
  18. }
  19. ?>