<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV></DIV>
<DIV> Oi André,</DIV>
<DIV> vou te dar um exemplo de placeholders :</DIV>
<DIV> </DIV>
<DIV> $sth=$dbh->prepare('INSERT INTO table VALUES (?,?,?)');</DIV>
<DIV> $sth->execute('placeholder1','2',3);</DIV>
<DIV> </DIV>
<DIV> Consiste em vc utilizar no comando SQL o ? ao invés dos dados diretamente.</DIV>
<DIV> No exemplo ele vai trocar o (?,?,?) pelos três dados fornecidos no execute.</DIV>
<DIV> Flw.<BR> </DIV>Daniel ® Antunes<BR><EM><FONT color=#007f40>profissional de informática</FONT></EM><BR><EM><FONT color=#007f40>gnu/linux user</FONT></EM> #238553
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Mensagem original ----<BR>De: André Garcia Carneiro <andre.garcia.carneir@terra.com.br><BR>Para: saopaulo-pm <saopaulo-pm@pm.org><BR>Enviadas: Terça-feira, 31 de Julho de 2007 14:18:18<BR>Assunto: [SP-pm] DBI - placeholders<BR><BR>
<DIV>Ave Perl!<BR><BR><BR>Pergunta simples que não achei referência na documentação do DBI, e não tive tempo de testar ainda. Se acharem<BR>algo na documentação do DBI, podem me xingar por favor!!! rs!<BR><BR>Placeholders deveriam tratar caracteres que precisam de 'escape', por exemplo, aspas simples?? <BR><BR><BR>Cheers!<BR><BR><BR><BR>--<BR>André Garcia Carneiro<BR>Developer(Perl/PHP)<BR>Member of "São Paulo Perl Mongers" - <A href="http://sao-paulo.pm.org/" target=_blank>http://sao-paulo.pm.org</A><BR><BR>_______________________________________________<BR>SaoPaulo-pm mailing list<BR>SaoPaulo-pm@pm.org<BR><A href="http://mail.pm.org/mailman/listinfo/saopaulo-pm" target=_blank>http://mail.pm.org/mailman/listinfo/saopaulo-pm</A></DIV></DIV><BR></DIV></div><br>
Alertas do Yahoo! Mail em seu celular. <a href="http://br.mobile.yahoo.com/mailalertas/">Saiba mais</a>.
</body></html>