[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] Conduits



On Mon, 11 Aug 2003, Marco van Beek wrote:
> For those of you who may be interested, the conduits I have been working on
> to synchronize PDA's with MySQL are available for download at
> http://ssis.sourceforge.net/ They are fully bi-directional fetch,dump
> conduits for the address book, date book, memo and to-do PDB's.

	Cool!

> I have a couple of issues still to solve, mainly tiding up the code and
> stopping the SQL code from being confused by an apostrophe in the data.

	I've only glanced at the code, but you should be able to fix the
apostrophe confusion by using

	$sql_insert_code = <<EOT;
		INSERT INTO Memo (
			Data,
			//...
		) VALUES (
			?,
			// ...
		)
	EOT
	$sql_insert = $dbh->prepare($sql_insert_code);
	$sql_insert->execute($current_record->{data});

I believe that's the recommended way of doing things.

-- 
Andrew Arensburger                      Actually, these _do_ represent the
arensb@ooblick.com                      opinions of ooblick.com!
                        Generic Tagline V 6.01
-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.