Jump to content

[SOLVED] Create Temporary Column


The Little Guy

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.