Jump to content

Recommended Posts

Hey,

TL:DR: The goal I want to achieve is getting statuses from a user's friends w/ an array of friends..

 

Things already set up:

  Table for statuses - id(an incremental thing to count), osid(what post, to allow comments), author, user_id(the author's id), type[a,b] (a   is a post, b is a comment) and postdate.

 

  Table for friends - id(incremental), user1(person that initiated the friendship), user1_id(that person's id), user2(person that accepts the friendship), user2_id(his id), datemade 

 

What needs to happen is create an array of all a user's friends pseudo code:

"Select user2_id where user1_id is logged_in_user_id"

"friends[] = loop(mysql query until no more)"

"loop:Select statuses where user_id is friends"

"Populate my screen with statuses"

 

I know this is bad pseudo code but please help me put together a working system!

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.