Help for this page

Select Code to Download


  1. or download this
    my $foo = MyDB::Foo->find_or_create({
        name => 'name', 
        uri => 'hello',
    });
    
  2. or download this
    package MyDB::Foo;
    use base MyDB;
    __PACKAGE__->table('foo');
    ...
        ('foo_id','name','uri')
    );
    1;
    
  3. or download this
    MyDB::Foo can't SELECT FROM   foo
    WHERE  name = ? AND uri = ?
    : DBD::mysql::st execute failed: You have an error in your SQL syntax;
    + check the manual that corresponds to your MySQL server version for t
    +he right syntax to use near 'FROM   foo
    ...
    WHERE  name = ? AND uri = ?
    " with ParamValues: 0='name', 1='hello'] at C:/Perl/site/lib/DBIx/Cont
    +extualFetch.pm line 52.
     at C:/Perl/site/lib/Class/DBI/Search/Basic.pm line 169
    
  4. or download this
    CREATE TABLE foo (
        foo_id INTEGER PRIMARY KEY AUTO_INCREMENT,
        name TEXT,
        uri TEXT
    );