Closed (duplicate)
Project:
phpBB2Drupal
Version:
master
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2008 at 00:48 UTC
Updated:
20 May 2009 at 22:27 UTC
In my recent update to HEAD, I replaced the old phpbb2 based query:
$query = "SELECT p.privmsgs_id, p.privmsgs_from_userid, p.privmsgs_to_userid,
p.privmsgs_subject, pt.privmsgs_text, pt.privmsgs_bbcode_uid, p.privmsgs_date,
CASE WHEN p.privmsgs_type = 1 THEN 1
WHEN p.privmsgs_type = 5 THEN 1
ELSE 0
END as newmsg,
p.privmsgs_ip, 0, 0, 0
FROM %sprivmsgs p
LEFT JOIN %sprivmsgs_text AS pt ON p.privmsgs_id = pt.privmsgs_text_id";
$messages = db_query($query, $pre, $pre);with a new one:
<?php
$query = "SELECT * FROM %sprivmsgs";
?>currently, this is enough. but once the privatemsg for drupal supports it, ideally there should be a JOIN with the privmsgs_to table to get the new or unread status. That kind of query is beyond my skills (anythign beyond the most basic of sql = greek to me.)
Comments
Comment #1
naheemsays commentedhttp://drupal.org/node/431820