[SP-pm] contar numero de dados em DBI
Thiago Glauco Sanchez
thiagoglauco at ticursos.net
Fri Jul 16 11:19:44 PDT 2010
Leia:
http://www.vivaolinux.com.br/artigo/Programando-uma-Intranet-com-Apache-MySQL-e-Perl-(parte-2)/?pagina=1
http://www.ibm.com/developerworks/data/library/techarticle/dm-0512greenstein/
perldoc dbi
E se tiver uns dólares sobrando, Programming the Perl DBI da O'REILLY
Depois, torne a perguntar sobre DBI na lista.
ou http://ticursos.net/perl.html
Nota: o my $num = $query->execute; pode não funcionar sempre, como
alerta a documentação do módulo, embora nunca tive problemas, nem com
select, com o MySQL no RedHat e no Ubuntu nem com o MS-SQL no Windows 2003.
Em 15/07/2010 20:15, Lucas Moraes escreveu:
> Oi gente, eu queria saber qual a função do DBI para contar elementos
> no select?
>
> no momento estou usando:
>
> COUNT(*)
>
> ou
>
> my $num = $query->execute;
>
> scalar($num);
>
> eu pensei que $num->rows ia retornar, mais não aconteceu nada.
>
> Obrigado.
>
> Deus é o limite!
>
>
> ------------------------------------------------------------------------
> SMS "HOTMAIL" naar 3010 en ontvang gratis de juiste instellingen voor
> Hotmail op je mobiele telefoon.
> <http://www.microsoft.com/netherlands/windowslive/Views/productdetail.aspx?product=HotmailTelefoon>
>
>
>
> _______________________________________________
> SaoPaulo-pm mailing list
> SaoPaulo-pm em pm.org
> http://mail.pm.org/mailman/listinfo/saopaulo-pm
--
What is the sound of Perl? Is it not the sound of a wall that people have
stopped banging their heads against?
—Larry Wall
Thiago Glauco Sanchez
Intrutor Perl e Redes
www.ticursos.net
More information about the SaoPaulo-pm
mailing list