CallableStatement Class Reference

Inherits PreparedStatement.

List of all members.

Public Member Functions


Member Function Documentation

CallableStatement::registerOutParameter ( $  paramIndex,  $  sqlType )

 

Register a parameter as an output param.

Parameters:
string $paramIndex The stored procedure param name (e.g. ).
int $sqlType The type of the parameter (e.g. Type::BIT) .

CallableStatement::getArray ( $  paramIndex)

 

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

Returns array

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

CallableStatement::getBoolean ( $  paramIndex)

 

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

Returns boolean

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

CallableStatement::getBlob ( $  paramIndex)

 

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

Returns Blob blob object

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

CallableStatement::getClob ( $  paramIndex)

 

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

Returns Clob clob object.

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:
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)

Returns string Date.

Exceptions:
SQLException - If the column specified is not a valid key in current field array.

CallableStatement::getFloat ( $  paramIndex)

 

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

Returns float

CallableStatement::getInt ( $  paramIndex)

 

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

Returns int

CallableStatement::getString ( $  paramIndex)

 

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

Returns string

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:
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)

Returns string Formatted time.

Exceptions:
SQLException - If the column specified is not a valid key in current field array.

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)

Returns string Timestamp

Exceptions:
SQLException - If the column specified is not a valid key in current field array.


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


Copyright © 2004 Hans Lellelid  
Creole[php4] CVS