Jump to content

Recommended Posts

What I was looking for was this query:

 

(
SELECT id, sender, 'mailbox' as `table`, subject, inbox, date FROM 
mailbox WHERE owner = '$_id' AND status = '0'
)
UNION
(
SELECT f.id, req as sender, 'friends' as `table`, 'Friend Request' as `subject`, 
CONCAT(u.first,' ',u.last) as `inbox`, date FROM 
friends f LEFT JOIN users u ON (f.req = u.id)
WHERE rec = '$_id' AND acc = '0'
) ORDER by date

That's more like 'temporary rows'...

 

oh... I see it as a column, but w/e all's good!

 

Would you keep this query, or is it very resource demanding?

 

I am going to make a second query that does something similar, but all it will do is generate a number of unread inbox info.

 

The one I gave in my previous post will be used when the user is viewing his/her mailbox, and the other will be when he/she is not.

 

So, will using these slow my site down, when I have lets say 1 GB for each table?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.