You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2002/02/06 06:14:23 UTC
Re: DBIx::Recordset and Select with $order
>
> In my perldoc DBIx::Recorset there is:
>
> *set = DBIx::Recordset -> Select (\%params, $fields, $order)
> $set -> Select (\%params, $fields, $order)
> $set -> Select ($where, $fields, $order)
> Selects records from the recordsets table(s).
> [...]
> order: comma separated list of fieldnames to sort on
>
> *set = DBIx::Recordset -> Search (\%params)
> [nothing with $order here]
>
> So the Documentation is *very* wrong. :)
No, according to that documentation your example has to be written as
*set = DBIx::Recordset->Select(
{'!DataSource' => $dsn,
'!Table' => 'config',
'!Username' => $user,
'!Password' => $pass}, undef, 'id');
again, order is the third parameter to Select and _not_ a part of the
parameter hash.
> (Yes, in the Examples Part $order is only used with Search, but i dont
> look there very often. :) )
>
It's mentioned under "Search parameters", as I wrote in my privious mail:
Search parameters
$start
First row to fetch. The row specified here will appear as index 0 in the
data array.
[..]
$order
Fieldname(s) for ordering (ORDER BY) (must be comma-separated, could
also contain USING)
Since Search (and other methods) can take the same parameters, the parameter
are grouped together in the documentation by type.
Hopefully it's more clear now
Gerald
P.S. You asked on the embperl mailing list, but answered on the modperl
list. I CC it to both...
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: DBIx::Recordset and Select with $order
Posted by Joerg Jaspert <em...@german.ath.cx>.
"Gerald Richter" <ri...@ecos.de> writes:
> No, according to that documentation your example has to be written as
> *set = DBIx::Recordset->Select(
> {'!DataSource' => $dsn,
> '!Table' => 'config',
> '!Username' => $user,
> '!Password' => $pass}, undef, 'id');
> again, order is the third parameter to Select and _not_ a part of the
> parameter hash.
Uups, öhm. I see the difference. Hmmpf i should read the docs more careful.
> Hopefully it's more clear now
Yes, thx.
> P.S. You asked on the embperl mailing list, but answered on the modperl
> list. I CC it to both...
Hmm, something strange happened with my filter. All mails sorted to the
Modperl-Archiv. Sorry.
--
begin OjE-ist-scheisse.txt
bye, Joerg
Registered Linux User #97793 @ http://counter.li.org
end
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org