Feature #36877
Optional adodb SetFetchMode
| Status: | Closed | Start date: | 2012-05-06 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Francois Suter | % Done: | 100% |
|
| Category: | - | |||
| Target version: | 1.1.0 | |||
| Votes: | 0 |
Description
Hi,
with attached patch it is possible to set adodb fetch mode (see: http://phplens.com/lens/adodb/docs-adodb.htm#adodb_fetch_mode) by setting 'fetchMode' (0, 1, 2, 3) in $TCA[$table]['ctrl']['external']['parameters'] array.
By instance I set 'fetchMode' => '2'
$TCA['pages']['ctrl']['external'] = array(
0 => array(
'description' => 'Test',
'connector' => 'sql',
'parameters' => array(
'driver' => $GLOBALS['externalServerDriver'],
'server' => $GLOBALS['externalServerHost'],
'user' => $GLOBALS['externalServerUser'],
'password' => $GLOBALS['externalServerPassword'],
'database' => $GLOBALS['externalServerDatabase'],
'fetchMode' => '2',
'query' => "SELECT field1, field2 FROM table",
),
'data' => 'array',
'reference_uid' => 'tx_myext_euid',
'priority' => 10
)
);so adodb returns an array with keys as external DB columns (field1, field2) names instead of numbers (0, 1).
It's backward compatible because if the parameter is not set nothing new happens.
I hope this can help!
Associated revisions
Added support for ADODB fetch mode parameter, resolves #36877
Added support for ADODB fetch mode parameter, resolves #36877
Added fetch mode parameter to configuration sample, references #36877
Added fetch mode parameter to configuration sample, references #36877
History
Updated by Francois Suter about 1 year ago
Hi Ian,
This sound very good. I have no release planned in the near future (I'm concentrating on taking external_impor to the next level), but I'll try to integrate this feature at some point not too far away in time.
Thanks for providing the patch.
Updated by Francois Suter 8 months ago
- Target version deleted (
1.1.0)
Updated by Francois Suter 8 months ago
- Status changed from New to Accepted
- Assignee set to Francois Suter
- Target version set to 1.1.0
Updated by Francois Suter 8 months ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r66014.
Updated by Francois Suter 8 months ago
- Status changed from Resolved to Closed