Gazelle/sections/ajax/get_friends.php

15 lines
357 B
PHP
Raw Normal View History

2013-03-05 08:00:26 +00:00
<?php
$DB->query("SELECT
2013-03-25 08:00:21 +00:00
f.FriendID, u.Username
FROM friends AS f
RIGHT JOIN users_enable_recommendations AS r
ON r.ID = f.FriendID
AND r.Enable = 1
RIGHT JOIN users_main AS u
ON u.ID = f.FriendID
WHERE f.UserID = '$LoggedUser[ID]'
ORDER BY u.Username ASC");
2013-03-05 08:00:26 +00:00
echo json_encode($DB->to_array(false, MYSQLI_ASSOC));
die();