I am working on a new feature which shows the "Last 10 Visitors" to a Member's Profile.

Here is the query I created...

Code MySQL:
SELECT m.username
FROM member AS m
INNER JOIN visitor_log AS v
ON m.id=v.visitor_id
WHERE v.member_viewed=19

In my "visitor_log" table in the "visitor_id" column I have these values...


...which represent different Usernames.

The "0" is what my PHP code inserted into the table when an anonymous or un-logged-in person visits the member's Profile.

I need the "0" returned in my record-set, AND I want a label like "Anonymous Visitor" to appear for m.username

I was considering just creating a record in my "member" table with an "id=0" and "username=Anonymous Visitor" but that doesn't seem proper.

So is there a way to swap any 0's for a label like "Anonymous Visitor" in the query above?



P.S. Should I be using the MySQL tag to show SQL in this thread, or is there an SQL tag which is better?????