I am currently having a bug with a MYSQL query for an online calendar I am writing. I have been looking at this bug for a couple days now and am still not able to figure out why it continues to do it.
I have 2 tables called calendar_users and comments
calendar_users has these fields in it: user_id, dispname, username, password, color, login
comments has these fields in it: comment_id, orig_user_id, month_posted, day_posted, year_posted, comment, upd_user_id
Here is the query im looking at right now:
Expand|Select|Wrap|Line Numbers
- $query = "
- SELECT DISTINCT a.color, o.comment
- FROM calendar_users a, comments o
- WHERE o.month_posted='" . $month . "'
- AND o.day_posted='" . $date . "'
- AND a.user_id=o.upd_user_id";