I've had an ongoing problem where the SQL statements in my perl programs
come out rather messily.

Does anyone have specific and general suggestions on how to write embedded
SQL code cleanly in perl programs? Here's an example of an ugly piece of
SQL statement I wrote recently:

$dbh->do
  ("REPLACE INTO services SET friendly=".$dbh->quote($friendly).
   ", parent=".$dbh->quote($parent).
   ", intentional=".$dbh->quote($intentional).
   ", address=INET_ATON(".$dbh->quote($address).")".
   ", port=".$dbh->quote($port).
   ", timeout=$timeout".
   ", priority=".$dbh->quote($priority));


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to