Structures_DataGrid::bind()
-- A simple way to add a record set to the datagrid
Описание
Этот пакет пока не документирован.
Параметр
- mixed
$container
The record set in any of the supported data
source types
- array
$options
Optional. The options to be used for the data
source
- string
$type
Optional. The data source type
Возвращаемое значение
returns
True if successful, otherwise PEAR_Error.
Throws
throws
no exceptions thrown
Examples
Пример 57-1. Bind an SQL query <?php
// Setup your database connection
$options = array('dsn' => 'mysql://user:password@host/db_name');
// Bind a basic SQL statement as datasource
// Note: ORDER BY and LIMIT clause are automatically added
$test = $datagrid->bind('SELECT * FROM my_table', $options);
// Print binding error if any
if (PEAR::isError($test)) {
echo $test->getMessage();
}
?> |
|
Заметка
Эта функция не должна вызываться статически.
HIVE: All information for read only. Please respect copyright! |
|