[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/MDB/ -> querysim.php (sommaire)

(pas de description)

Poids: 830 lignes (33 kb)
Inclus ou requis:0 fois
Référencé: 1 fois
Nécessite: 1 fichier
 MDB/Common.php

Définit 1 class

MDB_querysim:: (17 méthodes):
  MDB_querysim()
  connect()
  _close()
  setOption()
  query()
  _readFile()
  _buildResult()
  _parseOnDelim()
  _querySimSignature()
  getColumnNames()
  numCols()
  endOfResult()
  fetch()
  numRows()
  freeResult()
  fetchInto()
  nextResult()


Classe: MDB_querysim  - X-Ref

MDB QuerySim driver

MDB_querysim()   X-Ref
Constructor


connect()   X-Ref
Open a file or simulate a successful database connect

param: string $dsn the data source name (see MDB::parseDSN for syntax)
param: mixed $persistent (optional) boolean whether the connection should
return: mixed MDB_OK string on success, a MDB error object on failure

_close()   X-Ref
Close a file or simulate a successful database disconnect

return: bool TRUE on success, FALSE if file closed.

setOption($option, $value)   X-Ref
Set the option for the MDB class

param: string $option option name
param: mixed  $value value for the option
return: mixed MDB_OK or MDB_Error

query($query, $types = null)   X-Ref
Get QuerySim text from appropriate source and return
the parsed text.

param: string The QuerySim text
param: mixed   $types  array that contains the types of the columns in
return: mixed Simulated result set as a multidimentional

_readFile()   X-Ref
Read an external file

param: string filepath/filename
return: string the contents of a file

_buildResult($query)   X-Ref
Convert QuerySim text into an array

param: string Text of simulated query
return: multi-dimensional array containing the column names and data

_parseOnDelim($thisLine, $delim)   X-Ref
Split QuerySim string into an array on a delimiter

param: string $thisLine Text of simulated query
param: string $delim    The delimiter to split on
return: array containing parsed string

_querySimSignature($result)   X-Ref
Creates a signature for the QuerySim.
This is a work-around for not having a resultset resource handle to ref.

param: array $result the array of QuerySim results
return: string the signature

getColumnNames($result)   X-Ref
Retrieve the names of columns returned by the DBMS in a query result.

param: resource   $result    result identifier
return: mixed                an associative array variable

numCols($result)   X-Ref
Count the number of columns returned by the DBMS in a query result.

param: resource    $result        result identifier
return: mixed integer value with the number of columns, a MDB error

endOfResult($result)   X-Ref
check if the end of the result set has been reached

param: resource    $result result identifier
return: mixed TRUE or FALSE on sucess, a MDB error on failure

fetch($result, $row, $field)   X-Ref
fetch value from a simulated result set

param: array  $result simulated result
param: int    $row    number of the row where the data can be found
param: int    $field    field number where the data can be found
return: mixed string on success, a MDB error on failure

numRows($result)   X-Ref
returns the number of rows in a result object

param: ressource $result a valid result ressouce pointer
return: mixed MDB_Error or the number of rows

freeResult(&$result)   X-Ref
Free the internal resources associated with $result.

param: $result result identifier
return: bool TRUE on success, FALSE if $result is invalid

fetchInto(&$result, $fetchmode = MDB_FETCHMODE_DEFAULT, $rownum = null)   X-Ref
Fetch a row and return data in an array.

param: resource $result result identifier
param: int $fetchmode ignored
param: int $rownum the row number to fetch
return: mixed data array or NULL on success, a MDB error on failure

nextResult(&$result)   X-Ref
Move the array result pointer to the next available row

param: array a valid QuerySim result array
return: true if a result is available otherwise return false



Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7