Using perl Syntax Highlighting
- sub comparar{
- printf ("Estoy aquí.\n");
- my($tabla,$patron,$conexion)=@_;
- print "La tabla es: ",$tabla,"\n";
- my $sth = $conexion->prepare("SELECT * FROM $tabla");
- $sth->execute();
- my $encontrada= 0;
- $patron=~ s/^\s+//;
- while (my $ref = $sth->fetchrow_hashref() and $encontrada==0) {
- print "Patron en la bd: ",$ref->{'patron'},"\n";
- print "Patron varibale: ",$patron,"\n";
- if ( $patron eq $ref->{'patron'}){
- printf("$ref->{'patron'}\n");
- printf("$link\n");
- $encontrada = 1;
- }
- }
- $sth->finish();
- print "Encontrado: ",$encontrada,"\n";
- return $encontrada;
- }
Coloreado en 0.006 segundos, usando GeSHi 1.0.8.4