$result = mysql_query("SELECT u.userid, f.favoriteid FROM session u, favorites f WHERE u.userid=f.favoriteid and f.favoriteowner='$id'");
This query selects and returns to the user the number of favorites who are online.
"userid" in table "session" may contain ID numbers of users or IP addresses of guests who are not logged in.
I have a favorite with userid 194.
A quest with IP address 194.XX.XX.XX comes to the website. This query for some strange reason shows that I have 1 favorite online.
I don't use "LIKE" statement, so how is it possible that 194 = 194.XX.XX.XX ?
Thanks.