oci8Adapter.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * This Adapter translates the specific Database type links to the data and pulls the data into very
  4. * specific local variables to later be retrieved by the gateway and returned to the client.
  5. *
  6. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  7. * @copyright (c) 2003 amfphp.org
  8. * @package flashservices
  9. * @subpackage adapters
  10. * @version $Id: oci8Adapter.php,v 1.2 2005/07/22 10:58:09 pmineault Exp $
  11. */
  12. require_once(AMFPHP_BASE . "shared/adapters/RecordSetAdapter.php");
  13. class oci8Adapter extends RecordSetAdapter {
  14. /**
  15. * Constructor method for the adapter. This constructor implements the setting of the
  16. * 3 required properties for the object.
  17. *
  18. * @param resource $d The datasource resource
  19. */
  20. function oci8Adapter($d) {
  21. parent::RecordSetAdapter($d);
  22. $fieldcount = ocinumcols($d);
  23. for($j = 0; $j < $fieldcount; $j++) {
  24. $this->columnNames[] = ocicolumnname($d, $j+1);
  25. }
  26. $i = 0;
  27. while ( OCIFetchInto($d,$line,OCI_NUM+OCI_RETURN_LOBS+OCI_RETURN_NULLS)) {
  28. $this->rows[] = $line;
  29. }
  30. }
  31. }
  32. ?>