Using perl Syntax Highlighting
- if (defined $dbh) {
- if (defined $dp_s) {
- $sql = q/
- SELECT DP_CODE,
- DP_NAME,
- DP_STATUS,
- DP_ISI_OFFICE,
- DP_COUNTRY,
- DP_FORMATTING_OFFICE,
- LOCAL_DP_NAME
- FROM DP
- WHERE UPPER(DP_CODE) LIKE ?
- OR UPPER(DP_NAME) LIKE ?
- /;
- if ((defined $start) && (defined $end)) {
- $aux = $sql;
- $sql = undef;
- $sql = "Select * From (Select a.*, ROWNUM r From ($aux) a Where ROWNUM <= $end) Where r>=$start";
- }
- else {
- $start = 1;
- $end = 50;
- }
- my $sth = $dbh->prepare($sql);
- $keywords = uc($keywords);
- $sth->execute("%$keywords%","%$keywords%");
- my $cont=0;
- while (my $result = $sth->fetchrow_hashref) {
- $cont++;
- next if (($cont >= 51) && (!defined $total));
- push @DATA, $result;
- }
- $total = $sth->rows if (!defined $total);
- $end = $total if ($end > $total);
- $sth->finish;
- }
Coloreado en 0.003 segundos, usando GeSHi 1.0.8.4
Saludos a todos los perleros de Chile, ¡je,je,je,je!