Subversion Repositories PHPX

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
29 PointedEar 1
<?php
2
 
3
require_once __DIR__ . '/ODBCDB.php';
4
 
5
class AccessDB extends ODBCDB
6
{
7
  /**
8
   * Escapes a database name so that it can be used in a query.
9
   *
10
   * @param string $name
11
   *   The name to be escaped
12
   * @return string
13
   *   The escaped name
14
   */
15
  public function escapeName($name)
16
  {
17
    return '[' . $name . ']';
18
  }
19
 
20
  /**
21
   * (non-PHPdoc)
22
   * @see Database::_escapeAliasArray()
23
   */
24
  protected function _escapeAliasArray(array &$array)
25
  {
26
    foreach ($array as $column => &$value)
27
    {
28
      $value = $value . ' AS [' . $column . ']';
29
    }
30
 
31
    return $array;
32
  }
33
}