MySQLに格納しているのが年-月-日 時-分-秒だけど、YEARで年だけとか、MONTHとか、HOURとか、DAYOFMONTHしたいとき select as とかしなくてもいんだなあ my @Pictures = $c->model('DB::Picture')->search({ 'YEAR(datetime)' => $c->req->param('year'), });
※Fedora7を使用 [mecab導入] 楽だ。 yum -y mecab mecab-devel mecab-ipadic perl-mecab [senna導入] cd /home/hoge/rpmbuild/SOURCES wget http://iij.dl.sourceforge.jp/senna/25607/senna-1.0.7.tar.gz tar xzvf senna-1.0.7.tar.gz SPEC発見。 cp senna-1.0.7/senna.spec /home/hoge/rpmbuild/SPECS/. cd ../ rpmbuild -bb SPECS/senna.spec あら、エラーが出た。 error: File /usr/src/redhat/SOURCES/libsenna-1.0.7.tar.gz: No such f
DBICでdatetime型のカラムを使うときはInflateColumn::DateTimeを使ってinflate/deflate時に自動的にDateTimeクラスから/に変換してくれてとっても便利ですが、それに慣れっこで検索条件にdatetime型を指定するときは要注意です。 とはいっても、sqlite限定の問題。 sqlite> select id, username, created_on from users; 1|user1|2007-06-14 00:00:00 ... とかいうデータがあったとして my $dt = DateTime->new( year => 2007, month => 6, day => 14, time_zone => 'local' ); my $users = $schema->resultset('Users') ->search( { cre
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く