wall for community site

I have a community site with users who can upload photos,videos etc and I want to create a "wall page" (like face book wall).

How could I implement this.My problem is that I want to show videos etc (they are in separate tables) order by date and time and not the videos first and then the photos etc.

Is there a sql to implement this.

Suppose that the tables are

video:id,videoname…

photos:id,photoname…

I use the last version of Yii

Not sure what you mean with this… If you mean one SQL command to get all the different data… maybe it can be done… but a good analisy of your problem woudl be needed… and that is up to you ;)

What you need is something like an index page or a dashboard… that is a page that has different components on it (pictures / videos / messages)… so one idea would be to create widget for every component… and from that widget you get the data you need sorted the way you need it…

thank you for the replay,it may done but also I thought to create only one table with one field "type" as video/photo etc but maybe this table will be too large

Don’t have it as an overlay. Have a structured format.

make a table for the feed and every tine a new object is posted update the table. Date/Time , desc, URL

Not sure if that is what you said in your second post

You need to use MySql UNION to get data from different tables(you will maybe need to wrap some field names, so fields from all tables match same names, for example text, link, postedBy, date and so on)

Check:

http://dev.mysql.com/doc/refman/5.1/en/union.html