Jump to content

KFlash32

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by KFlash32

  1. Hi Need some help here to figure out how I can filter out something from a newsfeed Im creating. The principle are simple. One query get all the uses friend, and show the feed. Thats okey. Problems starts here. I have created a function now so let the users choose if he / she want to see other friends photos or videos in this feed. All that information are stored in a second MySQL table. What I try to do, is to filter this out, so not the spesific users photo OR video are visible in the stream for the users who does not want to see that kind of stuff. I figured out I cant do that in mysql with a line like this photo_id NOT IN (SELECT PHOTO ID FROM PHOTOS LEFT JOIN FILTER TABLE WHERE PHOTOS_OWNER = FILTER_FRIEND WHERE FILTER_OWNER = ME AND PHOTO_FRIEND = MY_FRIEND AND PHTOS = 1 in that way, it would simple not show that current photo if the ID match the ID in the PHOTO table. But not so easy was it not. So I try to figure out the best way to sort this off. Any help would be preciated.
  2. Hi I have plans in developing a connect function for remote login to my web side. I can't find any useful on Google. Some idees on how to code a API connect button? Something similiar to Facebook connect, Twitter connect etc. BUT this should not rely on facebook api. I'm going to make my own stand alone api. I know I need to use REST in backend, but I'm missing the knowledge to know how to send / recive the login data, and how to know when a user are online or not. I'm greatfull for any help. Also links. And also tips on how to make a developer plattform for apps, much like the way Facebook have it.
  3. Need some help here! I want to build a friendgroup - I have a full working friendsystem. My ide is this. I got a list of friends, make a group named Test. Put selected friends in there, make another group and put another friends in there. Some idees how to do that with prepared statements?? I search for tutorials, but couldn't find any. Any suggestions? The functions I need is this: 1. Make group 2. Add friend to group 3. Show group with selected friends 4. Rename groups 5. Move friend from one group to another 6. Delete group with all friends inside 7. Delete a empty group 8. Option to search for friends inside a group Tutorial, free source code - everything would help to solve this mystery ! So far is this the code I made, and didn't work at all public function create_friendgroup($profileownerid, $friends = NULL, $name) { $sql = "SELECT fg_friends_id FROM friend_groups WHERE fg_member_id = '$profileownerid' LIMIT 1"; if($stmt = $this->conn->prepare($sql)) { $stmt->execute(); $stmt->bind_result($friend); $stmt->fetch(); $stmt->close(); } if($friend != null) { $ua = explode(",", $friend); $ua = array_unique($ua); foreach ($ua as $u) { if($u !=NULL && $u !=$profileownerid) { $oldusers .= "{$u},"; } } } $newusers = $profileownerid; if ($oldusers != null) { $newusers .= "," . $oldusers; } $sql = "INSERT INTO friend_groups(fg_member_id,fg_friends_id, fg_name, fg_created_date) VALUES (?,?,?,?)"; $date = date("d-m-Y H:i"); if($stmt = $this->conn->prepare($sql)) { $stmt->bind_param('iiss',$profileownerid,$friends = trim($newusers, ","), $name,$date); $stmt->execute(); $stmt->close(); } } K.F
×
×
  • 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.