Re: using DBI to form query with variables that have quotes

2004-03-20 Thread Andrew Gaffney
Wiggins d'Anconia wrote: Andrew Gaffney wrote: WC -Sx- Jones wrote: Andrew Gaffney wrote: INSERT INTO people VALUES(NULL, "Firstname", "Lastname", ""123 Anywhere Address"", ..."); INSERT INTO people VALUES(NULL, "Firstname", "Lastname", '123 O'Walley Street', ..."); See the problem? I can't u

Re: using DBI to form query with variables that have quotes

2004-03-20 Thread Wiggins d'Anconia
Andrew Gaffney wrote: WC -Sx- Jones wrote: Andrew Gaffney wrote: INSERT INTO people VALUES(NULL, "Firstname", "Lastname", ""123 Anywhere Address"", ..."); INSERT INTO people VALUES(NULL, "Firstname", "Lastname", '123 O'Walley Street', ..."); See the problem? I can't use either quoting consiste

Re: using DBI to form query with variables that have quotes

2004-03-20 Thread Andrew Gaffney
WC -Sx- Jones wrote: Andrew Gaffney wrote: INSERT INTO people VALUES(NULL, "Firstname", "Lastname", ""123 Anywhere Address"", ..."); INSERT INTO people VALUES(NULL, "Firstname", "Lastname", '123 O'Walley Street', ..."); See the problem? I can't use either quoting consistently due to the nature

Re: using DBI to form query with variables that have quotes

2004-03-20 Thread Wiggins d'Anconia
WC -Sx- Jones wrote: Andrew Gaffney wrote: INSERT INTO people VALUES(NULL, "Firstname", "Lastname", ""123 Anywhere Address"", ..."); INSERT INTO people VALUES(NULL, "Firstname", "Lastname", '123 O'Walley Street', ..."); See the problem? I can't use either quoting consistently due to the nature

Re: using DBI to form query with variables that have quotes

2004-03-19 Thread Oliver Schnarchendorf
On Fri, 19 Mar 2004 23:21:20 -0600, Andrew Gaffney wrote: > See the problem? I can't use either quoting consistently due to the > nature of the data I'm working with. How about using the power that is offered to you by Perl??? There is a function offered by the DBI module called 'quote'. Followi

Re: using DBI to form query with variables that have quotes

2004-03-19 Thread WC -Sx- Jones
Andrew Gaffney wrote: INSERT INTO people VALUES(NULL, "Firstname", "Lastname", ""123 Anywhere Address"", ..."); INSERT INTO people VALUES(NULL, "Firstname", "Lastname", '123 O'Walley Street', ..."); See the problem? I can't use either quoting consistently due to the nature of the data I'm work

using DBI to form query with variables that have quotes

2004-03-19 Thread Andrew Gaffney
Damn, that's a mouthful. Hopefully someone understands it ;) I'm writing a script to take an existing data source (tab delimeted text file exported from Word doc w/ table) and insert the data into a MySQL DB using DBI. My problem is that some of the fields are either quoted ("") or have apostrop