CallableStatement Interface Reference
[Creole]

Inherits PreparedStatement.

Inherited by MSSQLCallableStatement.

List of all members.

Public Member Functions


Detailed Description

Interface for callable statements.

Author Hans Lellelid <hans@xmpl.org>
Version
Revision
1.7


Member Function Documentation

CallableStatement::registerOutParameter ( $ paramIndex, $ sqlType )

 

Register a parameter as an output param.
Parameters
$paramIndex The stored procedure param name (e.g. ).
$sqlType The type of the parameter (e.g. Type::BIT) .

array CallableStatement::getArray ( $ paramIndex )

 

Parameters
$paramIndex Parameter name (e.g. "@var1").

Returns array
Exceptions
SQLException if $paramIndex was not bound as output variable.

boolean CallableStatement::getBoolean ( $ paramIndex )

 

Parameters
$paramIndex Parameter name (e.g. "@var1").

Returns boolean
Exceptions
SQLException if $paramIndex was not bound as output variable.

Blob CallableStatement::getBlob ( $ paramIndex )

 

Parameters
$paramIndex Parameter name (e.g. "@var1").

Returns Blob blob object
Exceptions
SQLException if $paramIndex was not bound as output variable.

Clob CallableStatement::getClob ( $ paramIndex )

 

Parameters
$paramIndex Column name (string) or index (int).

Returns Clob clob object.

mixed.Formatted CallableStatement::getDate ( $ column, $ format = '%x' )

 

Return a formatted date.

The default format for dates returned is preferred (in your locale, as specified using setlocale()) format w/o time (i.e. strftime("%x", $val)). Override this by specifying a format second parameter. You can also specify a date()-style formatter; if you do, make sure there are no "%" symbols in your format string.

Parameters
$column Column name (string) or index (int) starting with 1 (if ResultSet::FETCHMODE_NUM was used).
$format Date formatter for use w/ strftime() or date() (it will choose based on examination of format string) If format is NULL, then the integer unix timestamp will be returned (no formatting performed).

Returns mixed.Formatted date, or integer unix timestamp (using 00:00:00 for time) if $format was null.
Exceptions
SQLException - If the column specified is not a valid key in current field array.

float CallableStatement::getFloat ( $ paramIndex )

 

Parameters
$paramIndex Column name (string) or index (int).

Returns float

int CallableStatement::getInt ( $ paramIndex )

 

Parameters
$paramIndex Column name (string) or index (int).

Returns int

string CallableStatement::getString ( $ paramIndex )

 

Parameters
$paramIndex Column name (string) or index (int).

Returns string

mixed CallableStatement::getTime ( $ column, $ format = '%X' )

 

Return a formatted time.

The default format for times returned is preferred (in your locale, as specified using setlocale()) format w/o date (i.e. strftime("%X", $val)). Override this by specifying a format second parameter. You can also specify a date()-style formatter; if you do, make sure there are no "%" symbols in your format string.

Parameters
$column Column name (string) or index (int) starting with 1 (if ResultSet::FETCHMODE_NUM was used).
$format Date formatter for use w/ strftime() or date() (it will choose based on examination of format string) If format is NULL, then the integer unix timestamp will be returned (no formatting performed).

Returns mixed Formatted time, or integer unix timestamp (using today's date) if $format was null.
Exceptions
SQLException - If the column specified is not a valid key in current field array.

mixed CallableStatement::getTimestamp ( $ column, $ format = 'Y-m-d H:i:s' )

 

Return a formatted timestamp.

The default format for timestamp is ISO standard YYYY-MM-DD HH:MM:SS (i.e. date('Y-m-d H:i:s', $val). Override this by specifying a format second parameter. You can also specify a strftime()-style formatter.

Hint: if you want to get the unix timestamp use the "U" formatter string.

Parameters
mixed $column Column name (string) or index (int) starting with 1 (if ResultSet::FETCHMODE_NUM was used).
string $format Date formatter for use w/ strftime() or date() (it will choose based on examination of format string) If format is NULL, then the integer unix timestamp will be returned (no formatting performed).

Returns mixed Formatted timestamp, or integer unix timestamp (if $format was null)
Exceptions
SQLException - If the column specified is not a valid key in current field array.

Implemented in MSSQLCallableStatement.


This file is part of the Creole[php5] library.


Copyright © 2004 Hans Lellelid  
Creole[php5] CVS