ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-DBI
perl-DBI
Better Way
by Antonio W. Lagnada other posts by this author
Mar 31 2000 10:07AM messages near this date
Re: Other than DBI problems. | Re: Better Way
***  From dbi-users - To unsubscribe, see the end of this message.  ***
   *** DBI Home Page - http://www.symbolstone.org/technology/perl/DBI/ ***

I have several questions:

What is the most efficient way/best way of doing this:

# this is a multiple row insertion

$sth = $dbh-> prepare( qw(
	INSERT INTO TABLE
        (First, Last, Address, Phone)
        VALUES(?,?,?,?)
)

# put this is a loop
# @values will have different
@values = ($fname,$lname, $address, $phone);
$sth-> execute(@values);
# end loop

Am I doing this correctly?
What is the value of $sth returned by $dbh-> prepare() method?



--

Antonio W. Lagnada
Silicon Optimization
http://wwwmm.lsil.com/~alagnada (internal)
(612) 921 8533

-- Binary/unsupported file stripped by Listar --
-- Type: text/x-vcard
-- File: alagnada.vcf
-- Desc: Card for Antonio W. Lagnada



------------------------------------------------------------------------------
To unsubscribe from this list, please visit: http://www.isc.org/dbi-lists.html
If you are without web access, or if you are having trouble with the web page,
please send mail to dbi-users-request@[...].org with the subject line of
'unsubscribe'.
------------------------------------------------------------------------------
Thread:
Antonio W. Lagnada
Jonathan Leffler
Michael A. Chase
Antonio Lagnada

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved