Cool, but LastMessage isnt attaching.
Question, how can i join in this query the usarname that im talking
(Condition like this: where user_id =/= my_user_id. Or first in the result
row always be my user_id then i know the rest...)? Like Facebook, always
show the another user, and not the user th
@josh
with joins and group statements it is easier to accomplish:
function ownConversations($uid, $type = 'all') {
$options = array(
'conditions' => array('ConversationUser.status
<'=>ConversationUser::STATUS_REMOVED),
'group'
i just have 2 points to mention for this subject:
1) If you are going to use an RDBMS to store the messages using MySQL then
use `InnoDB` as your table engine instead of `MyISAM`
2) This kind of tables by nature grows faster than the most of the other
tables in terms of records in your system, and
I have a simplified messaging system.
User
Message
MessageRecipient
MessageSender
doesn't support composing to multiple users or threaded conversations, works
fine as a simple system.
On 24 February 2011 01:26, Josh wrote:
> So to generate a user's "inbox", I'm guessing you would select all of
So to generate a user's "inbox", I'm guessing you would select all of the
conversation_id's from the conversation_users table and save them to an
array. Then you would select the messages from the messages table where the
conversation_id is in the array you made that contains all of the
conver
sure
CREATE TABLE IF NOT EXISTS `comm_conversations` (
`id` char(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`user_id` char(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`title` varchar(60) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`created` datetime NOT NULL,
`last_message_id
This is the structure I have used in the past.
id
user_id - Sending
recipient_id - Receiving
status
userFolder
recipientFolder
subject
content
created
modified
With the following enums (not mysql enums, but class integer/
constants).
status = 0 unread, 1 read, 2 replied, 3 forwarded
userFolder/r
Hey euromark,
That looks like exactly what I'm trying to do. Could you also let us know
what columns are in each table? I'm sort of following your logic, but not
100% and I think seeing the table columns would help a lot.
~Josh
--
Our newest site for the community: CakePHP Video Tutorials
Thank you guys for your inputs :)
agree with John, we need to take care of message deletion part..am
trying to figure out the best way to do this.
will update all of you very soon..mean time anyone out there doing
something similar can provide their suggestion/opinions.
Pave
On Nov 24, 4:20 am,
i implemented the "facebook" way
i hate those old fashioned messaging system. they are so out of date.
with "threaded" conversations you always have the last messages at
hand.
conversations HM conversation_users
conversations HM conversation_messages
conversation_users BT users
conversation_messag
You should specify your requirement to the messaging system!
1) A message must have a sender.
2) A message must have one or more receivers.
3) A message must indicate for each receiver, whether it has been read
or not.
4) A message must retain its list of receivers, even though a receiver
has delet
11 matches
Mail list logo