chat - SQL Duplicate result messages -
i have sql query:
select m.message_subject, m.message_message, m.message_smileys, m.message_datestamp, u.user_id, u.user_name, u.user_avatar ".db_messages." m left join (select user_id, user_name, user_avatar ".db_users." group user_id) u on m.message_from = u.user_id (message_to='".$userdata['user_id']."' , message_from = '108') or (message_to = '108' , message_from='".$userdata['user_id']."') order message_datestamp
result:
what need:
database: prntscr.com/9vm1s4
example:
me: hello 12:10
he: hi 12:20am
he: have ? 12:22am
me: fine 1:10pm
any advice?
well thank you
try add group m.message_from
before order by
part
Comments
Post a Comment