I want to display the total number of views for each user (views of his posts). I make a query in the database, it shows everything. When performing this function, users are displayed, but the number of views is in the form (1668115581132331241612389932289). How to make the count of views (views) be identical to each user, for example, user_id1 - (his views), user_id2 (his views), etc.?
function Wo_FeaturedUsers($limit = '', $type = '') { global $wo, $sqlConnect; if ($wo['loggedin'] == false) { return false; } $data = array(); $logged_user_id = $wo['user']['user_id']; $sql = mysqli_query($sqlConnect, $query_one); { $query_one = " SELECT `user_id`, SUM(views) FROM `Wo_Posts` WHERE `time` >= DATE_SUB( CURRENT_DATE, INTERVAL 90 DAY ) AND page_id = 0 GROUP BY `user_id` ORDER BY SUM(`views`) DESC LIMIT 30 "; $sql = mysqli_query($sqlConnect, $query_one); while ($fetched_data = mysqli_fetch_assoc($sql)) { $data[] = Wo_UserData($fetched_data['user_id']); echo $fetched_data['SUM(views)']; } } return $data; }