An Introduction to Class::DBI - Introduction 3

The Problem

Awkward

  • embedding one language (SQL) into another (Perl) is awkward:

    • dealing with placeholders and bind values:

             $sth = 'UPDATE Account SET balance = ? WHERE accno = ?'
      
      
      
             # ... later ...
      
             $sth->execute($balance, $account);
      

 

YAPC::Canada << Previous | Index | Next >>
Copyright © 2003 Michael Graham