Im having a problem with my query. I recently switched to PDO, which is kind of new to me. Now i need to use JOIN in my query to get data from another table without making two e
Change your query with this one:
$query = "SELECT * FROM `friends` as F INNER JOIN `users` as U ON `F.friendID` = `U.id` WHERE `F.userID` = '{$sess_user}' AND `F.request` = '0'";
And add this to your connection, it will show you the errors:
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Set Errorhandling to Exception