Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * count Online User. user_status 0 is offline user, user_status 1 is online user
- * @return Integer The return value shows how many Online User of the time
- *
- */
- function counterOnline() {
- $sql_count_visitor = "SELECT Count(DISTINCT users.uniq) from users
- where user_status='1'
- ORDER BY
- users.first_name ASC";
- $exec_count_visit = mysql_query($sql_count_visitor);
- $count_visit = mysql_num_rows($exec_count_visit);
- list($count_visit) = mysql_fetch_row($exec_count_visit);
- return $count_visit;
- }
- /**
- * count visitors of current user
- * @return Integer The return value shows how many Visitors of current User of the time
- */
- function counterVisitor() {
- $sql_count_visitor = "SELECT count(DISTINCT who_visit_myprofile.visiter_id) from who_visit_myprofile
- where user_id='" . $_SESSION['user'] . "' AND visiter_id!='" . $_SESSION['user'] . "'
- ORDER BY who_visit_myprofile.`timestamp` DESC";
- $exec_count_visit = mysql_query($sql_count_visitor);
- $count_visit = mysql_num_rows($exec_count_visit);
- list($count_visit) = mysql_fetch_row($exec_count_visit);
- return $count_visit;
- }
Advertisement
Add Comment
Please, Sign In to add comment