ここの情報は古いです。ご理解頂いた上でお取り扱いください。
- Timestamp:
-
Apr 8, 2008, 3:30:22 PM (14 years ago)
- Author:
-
kiwa
- Comment:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
-
- Property Keywords 再現待ち removed
-
Property
Summary
changed from
ポータルにコミュニティ最新書き込みが表示されない
to
MySQL4.0だとポータルにコミュニティ最新書き込みが表示されない
-
initial
|
v4
|
|
7 | 7 | http://sengen.s286.xrea.com/sns/public_html/?m=portal&a=page_user_top |
8 | 8 | }}} |
| 9 | |
| 10 | {{{ |
| 11 | 枠は表示されてデータが表示されない状態ですね。 |
| 12 | コミュニティの設定は全て参加者以外も公開になってます。 |
| 13 | 因みにSQLは4.0です。 |
| 14 | }}} |
| 15 | |
| 16 | {{{ |
| 17 | 補足です。最新コミュニティは表示位置10番に設定していますが、SmartyDebugの{$top}の値は |
| 18 | Array (1) |
| 19 | 0 => Array (3) |
| 20 | kind => COMMUNITY |
| 21 | contents => Array (0) |
| 22 | is_image => 0 |
| 23 | と表示されてます。 |
| 24 | }}} |
| 25 | |
| 26 | |
| 27 | {{{ |
| 28 | 試しにdb_portal_public_c_commmu_listをphpMyAdminで実行してみたところ、Sysntaxエラーが出ました。 |
| 29 | そこでエラー付近の |
| 30 | AND ctc.number = (select max(number) FROM c_commu_topic_comment where c_commu_topic_id = ct.c_commu_topic_id) |
| 31 | を削除して |
| 32 | SELECT ct.*, c.name as commu_name, ctc.r_datetime as comment_datetime, c.image_filename as image_filename FROM c_commu_topic as ct LEFT JOIN c_commu as c ON c.c_commu_id = ct.c_commu_id LEFT JOIN c_commu_topic_comment as ctc ON (ctc.c_commu_topic_id = ct.c_commu_topic_id) WHERE c.public_flag = 'public' ORDER BY comment_datetime DESC |
| 33 | で実行したところ、エラーは出なくなりました。 |
| 34 | |
| 35 | 同様にdb_portal_public_c_commmu_listの方も |
| 36 | LEFT JOIN c_commu_topic_comment as ctc ON (ctc.c_commu_topic_id = ct.c_commu_topic_id AND ctc.number = (select max(number) FROM c_commu_topic_comment where c_commu_topic_id = ct.c_commu_topic_id))" |
| 37 | をコメントアウトして |
| 38 | LEFT JOIN c_commu_topic_comment as ctc ON (ctc.c_commu_topic_id = ct.c_commu_topic_id )" |
| 39 | を追記したところ、ポータルの方にコミュの最新書き込みがあったトピックが表示されました。 |
| 40 | |
| 41 | もともとの |
| 42 | AND ctc.number = (select max(number) FROM c_commu_topic_comment where c_commu_topic_id = ct.c_commu_topic_id) |
| 43 | の部分の構文がmysql40と41で異なるのでしょうか? |
| 44 | }}} |