[geeks] Solaris 10 install size

Phil Stracchino phil.stracchino at speakeasy.net
Sun Jul 23 12:21:13 CDT 2006


Charles Shannon Hendrix wrote:
> Why are you looking at classes?  
> 
> There are several ways to do this.
> 
> It occurs to me the simplest way would be to avoid any big classes, and
> just bash strings:
> 
> 	$basesql = "insert into <database> values (%s, %s, %s,...)";
> 	while (loop through data structure) 
> 	{
> 		$sql = sprintf($basesql,$var1,$var2,$var3,...);
> 		$dbh->do($sql);
> 	}
> 
> There are different and faster ways like using bound variable statements
> and that sort of thing, but that's up to you and your exact needs.  It
> all boils down to a simple loop and string bashing.

Frankly, the obvious way is to use DBI and DBD::MySQL.

-- 
 Phil Stracchino                     Landline: 603-886-3518
 phil.stracchino at speakeasy.net         Mobile: 603-216-7037
 Renaissance Man, Unix generalist, Perl hacker, Free Stater



More information about the geeks mailing list