[Israel.pm] DBI

Meir Guttman meir at guttman.co.il
Sun Oct 31 05:42:17 PDT 2010


My dear shlomi,

OK, and how would you use placeholders to pass the following (My)SQL query?

LOAD DATA INFILE myLDIfile.tsv

INTO TABLE tbl_name

COLUMNS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY "'" ESCAPED BY '\\'

LINES TERMINATED BY '\r\n'

Meir

 

-----Original Message-----
From: Shlomi Fish [mailto:shlomif at iglu.org.il] 
Sent: Sunday, October 31, 2010 1:59 PM
To: perl at perl.org.il
Cc: Meir Guttman; Chanan Berler
Subject: Re: [Israel.pm] DBI

 

On Sunday 31 October 2010 13:44:00 Meir Guttman wrote:

> Dear Chanan,

> 

> I think the answer is DBI's 'quote' method. Please lookup

> http://search.cpan.org/~timb/DBI-1.615/DBI.pm#quote

> 

 

Placeholders are normally preferable over $dbh->quote() (as Jaime noted).

 

Regards,

 

      Shlomi Fish

 

-- 

-----------------------------------------------------------------

Shlomi Fish       http://www.shlomifish.org/

http://www.shlomifish.org/humour/ways_to_do_it.html

 

<rindolf> She's a hot chick. But she smokes.

<go|dfish> She can smoke as long as she's smokin'.

 

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20101031/d1442cd0/attachment-0001.htm 


More information about the Perl mailing list