how to set a DEFAULT value !!
for example, a table, 2 column Table | lang_code | CHAR(2)| default: 'en' | | time | DATETIME | | I would like to do in SQL INSERT table VALUES (DEFAULT, NOW()); I use DBIx::Class and it seems not so easy When I do pupulate, I write like this.. $schema-populate( 'Table', [ [ qw/lang_code time/ ], ( [ $schema-source('Table')-column_info('lang_code')-{default_value}, '2006-04-24 12:13:23', ], ) ], ) Question! is there any simple way I can write like this? $schema-populate( 'Table', ... [ DEFAUT, NOW(), ] .. ) thanks a lot!
Re: last insert id
Ron Savage schreef: Dr.Ruud: So we're back at: /\A(?:mysql|pg)\z/i /\A(?i:mysql|pg)\z/ [db_vendor()] In the case of 'DBI DSN' = 'dbi:Pg:dbname=staff', I store 'Pg'. In the case of 'DBI DSN' = 'dbi:ODBC:pg-staff', I store 'Pg'. [...] if ($self - db_vendor() =~ /(?:mysql|Pg)/) [...] my($vendor) = $self - db_vendor(); if ( ($vendor eq 'mysql') || ($vendor eq 'Pg') ) That last variant is what I prefer as well, although I would write it a bit different: my $vendor = $self - db_vendor(); if ( $vendor eq 'mysql' or $vendor eq 'Pg' ) But that difference is mainly at the source level, see: perl -MO=Deparse,x=7 -e 'if ( ($vendor eq q{mysql}) || ($vendor eq q{Pg}) ){}' o This thread is closed, ended, finished, shut down, terminated, etc, as previously noted Welcome to usenet. -- Affijn, Ruud Gewoon is een tijger.
DBI Development Fund (was: Re: last insert id)
Ron Savage schreef: o Fell free to donate large quantities of money to the Perl DBI Development Fund, at (watch wrap): https://donate.perlfoundation.org/index.pl?node=Fund%20Drive%20Statusselfund=10 2 That is really a nasty wrap: the 10 in stead of 102 hides the DBI Development Fund. This one is 76 chars: http://donate.perlfoundation.org/index.pl?node=Fund+Drive+Statusselfund=102 Variant of 68 chars: http://donate.perlfoundation.org/?node=Fund+Drive+Statusselfund=102 (tested with Firefox 1.5.0.2 on a Win2K system) -- Affijn, Ruud Gewoon is een tijger.
DBD module loading problem
Objective - execute perl modules from apache that access an oracle database Oracle database - 10gr2, SUSE SLES9 linux Apache server - RHAS 4.0, oracle 10gr2 instant client Perl Version perl -v This is perl, v5.8.5 built for i386-linux-thread-multi Apache Version apachectl -v Server version: Apache/2.0.55 Server built: Feb 28 2006 10:15:42 mod_perl, DBI, DBD versions mod_perl -2.0.2 DBI-1.50 DBD-Oracle 1.17 Apache DBI-0.9901 Error when running perl module from apache error_log file [Sat Apr 22 20:48:04 2006] emahni.pl: install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libnnz10.so: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230. ORACLE_HOME, LD_LIBRARY_PATH ($ORACLE_HOME/lib), TWO_TASK, and LD_RUN_PATH($ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib) set in httpd.conf Running the script from the command line connects to the database and returns correct results. I've googled using the following: module DBD::Oracle: libnnz10.so The third and fourth google entries look as though they may be helpful but i'm receiving a server busy message. Anyone got an idea what is on these pages or experienced the same problem and would like to share a resolution? Thanks.
Re: DBD module loading problem
One more thing - all perl makefile.pl, make, make test, make install, were successful for mod_perl, DBI, DBD Kevin Moore wrote: Objective - execute perl modules from apache that access an oracle database Oracle database - 10gr2, SUSE SLES9 linux Apache server - RHAS 4.0, oracle 10gr2 instant client Perl Version perl -v This is perl, v5.8.5 built for i386-linux-thread-multi Apache Version apachectl -v Server version: Apache/2.0.55 Server built: Feb 28 2006 10:15:42 mod_perl, DBI, DBD versions mod_perl -2.0.2 DBI-1.50 DBD-Oracle 1.17 Apache DBI-0.9901 Error when running perl module from apache error_log file [Sat Apr 22 20:48:04 2006] emahni.pl: install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libnnz10.so: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230. ORACLE_HOME, LD_LIBRARY_PATH ($ORACLE_HOME/lib), TWO_TASK, and LD_RUN_PATH($ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib) set in httpd.conf Running the script from the command line connects to the database and returns correct results. I've googled using the following: module DBD::Oracle: libnnz10.so The third and fourth google entries look as though they may be helpful but i'm receiving a server busy message. Anyone got an idea what is on these pages or experienced the same problem and would like to share a resolution? Thanks.