Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Problem creating a row with a manually specified primary key via CDBI::FromCGI

by Booger (Pilgrim)
on Oct 09, 2004 at 19:44 UTC ( [id://397897]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $r->{params}{$self->primary_columns} = &some_value;
    
    $h = CGI::Untaint->new(%{$r->{params}});
    
    $obj = $self->create_from_cgi($h);
    
  2. or download this
    Can't insert new Library::Book: DBD::mysql::st execute failed: 
    Column 'id' cannot be null [for Statement "INSERT INTO book (name, aut
    +hor, id) VALUES (?, ?, ?)"]
    ...
    /usr/local/lib/perl5/site_perl/5.8.5/DBIx/ContextualFetch.pm line 51, 
    +<GEN2> line 7. 
    at 
    /usr/local/lib/perl5/site_perl/5.8.5/Class/DBI/FromCGI.pm line 246
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://397897]
Approved by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-23 18:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found