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

Changeset 3372


Ignore:
Timestamp:
Jun 28, 2007, 3:59:50 PM (12 years ago)
Author:
ToshihiroK
Message:

postgres:setup用SQL作成

Location:
OpenPNE/branches/prj/postgres/2_8_1
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/prj/postgres/2_8_1/setup/sql/mysql41/install/install-2.8-create_tables.sql

    r3054 r3372  
    371371CREATE TABLE `c_diary_category` (
    372372  `c_diary_category_id` int(11) NOT NULL auto_increment,
    373   `category_name` text character set utf8 collate utf8_unicode_ci NOT NULL,
     373  `category_name` text NOT NULL,
    374374  `c_member_id` int(11) NOT NULL default '0',
    375375  `r_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
     
    460460CREATE TABLE `c_holiday` (
    461461  `c_holiday_id` int(11) NOT NULL auto_increment,
    462   `name` text character set utf8 collate utf8_unicode_ci NOT NULL,
     462  `name` text NOT NULL,
    463463  `month` int(11) NOT NULL default '0',
    464464  `day` int(11) NOT NULL default '0',
  • OpenPNE/branches/prj/postgres/2_8_1/webapp/lib/db/banner.php

    r1856 r3372  
    1818        $sql .= ' AND is_hidden_before = 0';
    1919    }
    20     $sql .= ' ORDER BY RAND()';
     20    $sql .= ' ORDER BY RANDOM()';
    2121
    2222    return db_get_row($sql);
     
    3636        $sql .= ' AND is_hidden_before = 0';
    3737    }
    38     $sql .= ' ORDER BY RAND()';
     38    $sql .= ' ORDER BY RANDOM()';
    3939
    4040    return db_get_row($sql);
  • OpenPNE/branches/prj/postgres/2_8_1/webapp/lib/db/bookmark.php

    r2853 r3372  
    161161
    162162    $sql = 'SELECT c_member_id_to AS c_member_id FROM c_bookmark' .
    163             ' WHERE c_member_id_from = ? ORDER BY RAND()';
     163            ' WHERE c_member_id_from = ? ORDER BY RANDOM()';
    164164    $params = array(intval($c_member_id));
    165165
  • OpenPNE/branches/prj/postgres/2_8_1/webapp/lib/db/commu.php

    r3057 r3372  
    493493    $sql = 'SELECT c_member.* FROM c_member, c_commu_member' .
    494494            ' WHERE c_member.c_member_id = c_commu_member.c_member_id' .
    495             ' AND c_commu_id = ? ORDER BY RAND()';
     495            ' AND c_commu_id = ? ORDER BY RANDOM()';
    496496    $params = array(intval($c_commu_id));
    497497    $lst = db_get_all_limit($sql, 0, $limit, $params);
     
    522522            " AND cct.c_commu_id = ?".
    523523            " group by cct.c_commu_topic_id " .
     524                ", cct.name" .
     525                ", cct.c_commu_id" .
     526                ", cctc.image_filename1" .
     527                ", cctc.image_filename2" .
     528                ", cctc.image_filename3" .
    524529            " order by r_datetime desc ";
    525     $params = array((bool)$event_flag, intval($c_commu_id));
     530   
     531    $params = array($event_flag, intval($c_commu_id));
    526532    $list = db_get_all_limit($sql, 0, $limit, $params);
    527533
     
    619625        " WHERE c_commu_member.c_member_id = ?".
    620626        " AND c_commu.c_commu_id =  c_commu_member.c_commu_id" .
    621         " ORDER BY RAND()";
     627        " ORDER BY RANDOM()";
    622628    $params = array(intval($c_member_id));
    623629    $lst = db_get_all_limit($sql, 0, $limit, $params);
     
    11751181    $sql = 'SELECT DISTINCT c.* FROM c_commu_member AS cm, c_commu AS c' .
    11761182            ' WHERE cm.c_member_id = ? AND c.c_commu_id = cm.c_commu_id' .
    1177             ' ORDER BY RAND()';
     1183            ' ORDER BY RANDOM()';
    11781184    $params = array(intval($c_member_id));
    11791185    $c_commu_list = db_get_all_limit($sql, 0, $limit, $params);
     
    13871393    $sql .= "WHERE ccm.c_commu_id = ?" .
    13881394            " AND ccm.c_member_id = cm.c_member_id";
    1389     $sql .= " ORDER BY RAND()";
     1395    $sql .= " ORDER BY RANDOM()";
    13901396    $params = array(intval($c_commu_id));
    13911397    $c_commu_member_list = db_get_all_limit($sql, 0, $limit, $params);
     
    14581464    $sql = 'SELECT c_member_id, nickname FROM c_member' .
    14591465            ' WHERE c_member_id IN ( '. $result . ') ' .
    1460             ' ORDER BY RAND()';
     1466            ' ORDER BY RANDOM()';
    14611467    return db_get_all_limit($sql, 0, $limit);
    14621468}
     
    16601666    $select = 'SELECT c_commu.*';
    16611667
    1662     $where = ' WHERE 1';
     1668    $where = ' WHERE true';
    16631669    $params = array();
    16641670    if ($c_commu_category_id) {
     
    16961702        break;
    16971703    }
    1698 
    16991704    $list = db_get_all_page($sql, $page, $page_size, $params);
    17001705    foreach ($list as $key => $value) {
     
    17361741    $sql = 'SELECT * FROM c_commu';
    17371742
    1738     $where = ' WHERE 1';
     1743    $where = ' WHERE true';
    17391744    $params = array();
    17401745    if ($search_word) {
     
    20632068        'c_commu_category_id' => intval($c_commu_category_id),
    20642069        'public_flag' => $public_flag,
    2065         'is_send_join_mail' => (bool)$is_send_join_mail,
     2070        'is_send_join_mail' => $is_send_join_mail,
    20662071    );
    20672072
    20682073    if ($image_filename) $data['image_filename'] = $image_filename;
    20692074    if (!is_null($is_display_map)) {
    2070         $data['is_display_map'] = (bool)$is_display_map;
     2075        $data['is_display_map'] = $is_display_map;
    20712076        $data['map_latitude'] = $map_latitude;
    20722077        $data['map_longitude'] = $map_longitude;
     
    24702475        'c_member_id' => intval($topic['c_member_id']),
    24712476        'name'        => $topic['name'],
    2472         'event_flag'  => (bool)$topic['event_flag'],
     2477        'event_flag'  => $topic['event_flag'],
    24732478        'capacity'  => intval($topic['capacity']),
    24742479        'r_datetime'  => db_now(),
  • OpenPNE/branches/prj/postgres/2_8_1/webapp/lib/db/friend.php

    r3057 r3372  
    258258
    259259    $sql = 'SELECT c_member_id_to AS c_member_id FROM c_friend' .
    260             ' WHERE c_member_id_from = ? ORDER BY RAND()';
     260            ' WHERE c_member_id_from = ? ORDER BY RANDOM()';
    261261    $params = array(intval($c_member_id));
    262262    if ($limit) {
     
    340340
    341341    $sql = 'SELECT * FROM c_friend' .
    342             ' WHERE c_member_id_to = ? AND intro <> \'\' ORDER BY RAND()';
     342            ' WHERE c_member_id_to = ? AND intro <> \'\' ORDER BY RANDOM()';
    343343    $params = array(intval($c_member_id));
    344344    $list = db_get_all_limit($sql, 0, $limit, $params);
     
    455455    $sql .= " WHERE cf.c_member_id_from = ?" .
    456456            " AND cm.c_member_id=cf.c_member_id_to";
    457     $sql .= " ORDER BY RAND()";
     457    $sql .= " ORDER BY RANDOM()";
    458458    $params = array(intval($c_member_id));
    459459    $c_friend_list = db_get_all_limit($sql, 0, $limit, $params);
     
    598598    $sql .= " WHERE cf.c_member_id_from = ?".
    599599            " AND cf.c_member_id_to = cm.c_member_id";
    600     $sql .= " ORDER BY RAND()";
     600    $sql .= " ORDER BY RANDOM()";
    601601    $params = array(intval($c_member_id));
    602602    return db_get_all_limit($sql, 0, 50, $params);
  • OpenPNE/branches/prj/postgres/2_8_1/webapp/lib/db/member.php

    r3057 r3372  
    235235    $page_size = intval($page_size);
    236236
    237     $where = " WHERE 1";
     237    $where = " WHERE true";
    238238    $params = array();
    239239
     
    984984        'c_member_id_invite'  => intval($c_member['c_member_id_invite']),
    985985        'c_password_query_id' => intval($c_member['c_password_query_id']),
    986         'is_receive_mail' => (bool)$c_member['is_receive_mail'],
    987         'is_receive_ktai_mail'  => (bool)$c_member['is_receive_ktai_mail'],
     986        'is_receive_mail' => $c_member['is_receive_mail'],
     987        'is_receive_ktai_mail'  => $c_member['is_receive_ktai_mail'],
    988988        'is_receive_daily_news' => intval($c_member['is_receive_daily_news']),
    989989        'r_date' => db_now(),
  • OpenPNE/branches/prj/postgres/2_8_1/webapp/lib/db/review.php

    r2973 r3372  
    162162    $from = " FROM c_review INNER JOIN c_review_comment USING (c_review_id)";
    163163
    164     $where = ' WHERE 1';
     164    $where = ' WHERE true';
    165165    $params = array();
    166166    if ($keyword) {
Note: See TracChangeset for help on using the changeset viewer.