ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 10177


Ignore:
Timestamp:
Jan 15, 2009, 4:02:28 PM (11 years ago)
Author:
kiwa
Message:

#3242:PostgreSQL8系だと日時集計にデータを反映させるようにする修正の修正漏れ(trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/modules/admin/lib/db_admin.php

    r9726 r10177  
    13601360    if ($month_flag) {
    13611361        if ($GLOBALS['_OPENPNE_DSN_LIST']['main']['dsn']['phptype'] == 'pgsql') {
    1362             $where .= " and substr(r_datetime,1, 7) = ? ";
     1362            $where .= " and substr(r_datetime::text,1, 7) = ? ";
    13631363        } else {
    1364             $where .= " and left(r_datetime, 7) = ? ";
     1364            $where .= " and left(r_datetime::text, 7) = ? ";
    13651365        }
    13661366        array_push($params,substr($ymd,0,7));
     
    15391539    if ($month_flag) {
    15401540        if ($GLOBALS['_OPENPNE_DSN_LIST']['main']['dsn']['phptype'] == 'pgsql') {
    1541             $where .= " and substr(r_datetime,1,7) = ? ";
     1541            $where .= " and substr(r_datetime::text,1,7) = ? ";
    15421542        } else {
    15431543            $where .= " and left(r_datetime, 7) = ? ";
     
    15461546    } else {
    15471547        if ($GLOBALS['_OPENPNE_DSN_LIST']['main']['dsn']['phptype'] == 'pgsql') {
    1548             $where .= " and substr(r_datetime,1,10) = ? ";
     1548            $where .= " and substr(r_datetime::text,1,10) = ? ";
    15491549        } else {
    15501550            $where .= " and left(r_datetime,10) = ? ";
     
    16171617    if ($month_flag) {
    16181618        if ($GLOBALS['_OPENPNE_DSN_LIST']['main']['dsn']['phptype'] == 'pgsql') {
    1619             $where .= " and substr(r_datetime,1,7) = ? ";
     1619            $where .= " and substr(r_datetime::text,1,7) = ? ";
    16201620        } else {
    16211621            $where .= " and left(r_datetime, 7) = ? ";
     
    16241624    } else {
    16251625        if ($GLOBALS['_OPENPNE_DSN_LIST']['main']['dsn']['phptype'] == 'pgsql') {
    1626             $where .= " and substr(r_datetime,1,10) = ? ";
     1626            $where .= " and substr(r_datetime::text,1,10) = ? ";
    16271627        } else {
    16281628            $where .= " and left(r_datetime,10) = ? ";
     
    16581658    if ($month_flag) {
    16591659        if ($GLOBALS['_OPENPNE_DSN_LIST']['main']['dsn']['phptype'] == 'pgsql') {
    1660             $where .= " and substr(r_datetime,1,7) = ? ";
     1660            $where .= " and substr(r_datetime::text,1,7) = ? ";
    16611661        } else {
    16621662            $where .= " and left(r_datetime, 7) = ? ";
     
    16651665    } else {
    16661666        if ($GLOBALS['_OPENPNE_DSN_LIST']['main']['dsn']['phptype'] == 'pgsql') {
    1667             $where .= " and substr(r_datetime,1,10) = ? ";
     1667            $where .= " and substr(r_datetime::text,1,10) = ? ";
    16681668        } else {
    16691669            $where .= " and left(r_datetime,10) = ? ";
Note: See TracChangeset for help on using the changeset viewer.