Myspace-like bulletin system

Discussion in 'PHP' started by madk, Nov 12, 2007.

  1. #1
    Hello all,

    I'm trying to add Myspace like bulletin system to my site for our users to use. Right not I have a table that stores all the user info and a table that stores friend info. The friends table just stores the user_id of each of the friends.

    Now I want to create a new table for the bulletins and keep track of them by the user_id of the user who posted.

    This could be just as easy as querying all your friend user_ids and then for each user ID query the bulletin table and check to see if this user has posted a bulletin. This seems to be very db intensive. I for example have over 200 friends. So it'd be 1 query to get my friends user ids and then another 200+ to check each bulletin.

    What I am looking for is a less db intensive. Does anyone have any solutions or ideas? These bulletins are going to be included on every page and I would hate to have to make that many db calls.

    Please guide me and thanks in advance.

    M.Kris
     
    madk, Nov 12, 2007 IP