Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

DBI vs DBIx::Recordset vs princepawn vs chromatic

by princepawn (Parson)
on Mar 08, 2001 at 00:32 UTC ( #62820=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
         .... For example, the author is either unaware of hash slices 
         or chooses not to use them in the first code example.  While 
    ...
         [in the DBI example] with hash slices ....  It would be possible 
         to improve the final example by using placeholders,
         as well ....
    
  2. or download this
    $sql='insert into uregisternew
            (country, firstname, lastname, userid, password, address1, cit
    +y,
    ...
            $sth2->execute(@data);
            $sth2->finish();
    
  3. or download this
            $sth2->execute(@data);
     to
            $sth2->execute(@formdata{@formdata_column_ordering});
    
  4. or download this
    sub make_placeholders { 
       sprintf "(%s)", join ',',  '?' x @_;
    ...
       sprintf "(%s)", join ',',  @_;
    }
    
  5. or download this
    $sql = sprintf "insert into %s values %s", 
         make_columns(@formdata_column_ordering),
         make_placeholders(@formdata_column_ordering) ;
    
  6. or download this
        The key way to determine whether a particular module/library is
        matched to the level of a task is to count the number of lines of
        ``prep code'' you must write before you can do what you want.
    
  7. or download this
     1 create 2 subroutines 
     2 use these subroutines to generate sql 
     3 connect to the database
     4 obtain database and statement handles 
     5 commit the record to database.
    
  8. or download this
        DBIx::Recordset->Insert({ %connection_hash, %formdata });
    
  9. or download this
          In most cases the gap between DBI's API and Perl applications
          has been bridged by indiscriminately mixing generic
          application-level functionality with the specifics of the
          current application.
    
  10. or download this
    $sql= sprintf 'insert into uregisternew
            (%s) values (%s)', 
          join ',', @formdata_ordering,
          join ',', '?' x @formdata_ordering;
    
  11. or download this
          Another maladaptive way that the DBI API has been extended for
          application-level databasing is by developing a collection of
          generic application-level tools but not publishing them.
    
  12. or download this
           The final way to misuse DBI in an application is to use it
           directly.
    
  13. or download this
        .... For example, the author is either unaware of hash slices 
         or chooses not to use them in the first code example.
    
  14. or download this
         It would be possible to improve the final example by using
         placeholders, as well ....
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://62820]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2020-05-31 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?