You are here

function DB_common::getListOf in Flickr API 5

Lists internal database information

Parameters

string $type type of information being sought.: Common items being sought are: tables, databases, users, views, functions Each DBMS's has its own capabilities.

Return value

array an array listing the items sought. A DB DB_Error object on failure.

1 call to DB_common::getListOf()
DB_common::getTables in phpFlickr/PEAR/DB/common.php
Lists the tables in the current database

File

phpFlickr/PEAR/DB/common.php, line 2068

Class

DB_common
DB_common is the base class from which each database driver class extends

Code

function getListOf($type) {
  $sql = $this
    ->getSpecialQuery($type);
  if ($sql === null) {
    $this->last_query = '';
    return $this
      ->raiseError(DB_ERROR_UNSUPPORTED);
  }
  elseif (is_int($sql) || DB::isError($sql)) {

    // Previous error
    return $this
      ->raiseError($sql);
  }
  elseif (is_array($sql)) {

    // Already the result
    return $sql;
  }

  // Launch this query
  return $this
    ->getCol($sql);
}