News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1186031532:v:use_geshi-1:v:type-php

Started by Guest, Aug 02, 2007, 05:12 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Guest

SELECT
   ft.TOPIC_ID AS ID_TOPIC, ft.FORUM_ID AS ID_BOARD, UNIX_TIMESTAMP(REPLACE(ft.T_DATE, '\0', '')) AS TposterTime,
   ft.T_SUBJECT AS subject, ft.T_AUTHOR AS TID_MEMBER, ft.T_IP AS TposterIP, REPLACE(REPLACE(ft.T_MESSAGE, '\n', '
'), '\r', '') AS Tbody, UNIX_TIMESTAMP(REPLACE(ft.T_LAST_EDIT, '\0', '')) AS TmodifiedTime,
   
   UNIX_TIMESTAMP(REPLACE(fr.R_DATE, '\0', '')) AS RposterTime, UNIX_TIMESTAMP(REPLACE(fr.R_LAST_EDIT, '\0', '')) AS RmodifiedTime,
   fr.R_AUTHOR AS RID_MEMBER, fr.R_IP AS RposterIP, REPLACE(REPLACE(R_MESSAGE, '\n', '
'), '\r', '') AS Rbody,


FROM `utdsm_snitz`.FORUM_TOPICS AS ft, `utdsm_snitz`.FORUM_REPLY AS fr
WHERE fr.TOPIC_ID = ft.TOPIC_ID
ORDER BY IFNULL(fr.R_DATE, ft.T_DATE);