PageRenderTime 48ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/05_Desarrollo/lib/adodb/tests/test2.php

https://bitbucket.org/SerafinAkatsuki/consultorio
PHP | 26 lines | 18 code | 7 blank | 1 comment | 1 complexity | 24ae36f4587ffdc6f76b0ae0c3d72ed8 MD5 | raw file
Possible License(s): 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. ?>