Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT m.*,
- CASE m.senderuserid
- WHEN '2'
- THEN 'Server'
- ELSE concat(u.voornaam,' ',u.famnaam)
- END AS fname,
- u.id
- FROM (`user` u, `message` m)
- WHERE (m.senderuserid =u.id || m.senderuserid ='2')
- AND m.customercode ='test'
- AND m.archive != '1'
- AND m.customercode ='test'
- AND m.receiveruserid = '4e4d8a4dd886e4.43611321'
- AND m.type IN ('info','action','permission','reminder')
- AND u.customercode ='test' ORDER BY datecreated DESC;
- --> 2 seconds
Add Comment
Please, Sign In to add comment