Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- #get friends
- $kack = "1";
- $query = $conn->prepare('SELECT * FROM '.$tb['conre'].' WHERE '.$cr['to'].' = :id OR '.$cr['from'].' = :id AND '.$cr['state'].' = :state ');
- $query->execute(array(
- ':id' => $user_id,
- ':state' => $kack
- ));
- $result = $query->fetchAll();
- if ( count($result) ){
- #for each friend
- foreach($result as $row){
- echo "Freundschaft : ".$row[$cr['to']]." + ".$row[$cr['from']];
- $query = $conn->prepare('SELECT * FROM '.$tb['feed'].' WHERE '.$feed['user'].' = :id AND '.$feed['about'].' = :id2 OR '.$feed['about'].' = :id AND '.$feed['user'].' = :id2 ORDER BY '.$feed['time'].' DESC ');
- $query->execute(array(
- ':id' => $row[$cr['to']],
- ':id2' => $row[$cr['from']]
- ));
- $result = $query->fetchAll();
- if ( count($result) ){
- #for each new friendship
- foreach($result as $row) {
- [..........]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement