We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transcribed verbatim from CPAN RT#127170, warts and all.
Sat Sep 22 05:17:36 2018 KES [...] cpan.org - Ticket created Subject: Another example to bind columns
The H.Merijn Brand example to binds columns to the values inside a hash is useful:
$sth->bind_columns( \( @row{ @{$sth->{NAME_lc} } } ))
but has a weakness: If data already fetched call to ->bind_columns will flush current values.
If you want to bind_columns after you have fetched you can use:
use feature 'refaliasing'; no warnings "experimental::refaliasing"; while( my $row = $sth->fetchrow_arrayref ) { \(@$data{ $sth->{NAME_lc}->@* }) = \(@$row); }
For older perls:
use Data::Alias; alias @$data{ $sth->{NAME_lc}->@* } = @$row;
This is useful in situations when you have many left joins, but wanna to join your %$data hash to only subset of fetched values.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Transcribed verbatim from CPAN RT#127170, warts and all.
Sat Sep 22 05:17:36 2018 KES [...] cpan.org - Ticket created
Subject: Another example to bind columns
The H.Merijn Brand example to binds columns to the values inside a hash is useful:
but has a weakness: If data already fetched call to ->bind_columns will flush current values.
If you want to bind_columns after you have fetched you can use:
For older perls:
This is useful in situations when you have many left joins, but wanna to join your %$data hash to only subset of fetched values.
The text was updated successfully, but these errors were encountered: