This is the toughest query I ever made:
<http://robertr.pastebin.com/X4bG4pFp>

```
"SELECT  `user`.`id` ,  `user`.`fname` ,  `user`.`lname` , 
YEAR(  `user`.`bday` ) AS  `bday_year` ,  `user`.`class_id` , 
( SELECT  `class`.`class_name` 
  FROM  `wp_class_classes`  `class` 
  WHERE  `user`.`class_id` =  `class`.`id`) AS  `class_name` 
FROM  `wp_class_users`  `user` 
WHERE MONTH(  `bday` ) = $month AND DAY(  `bday` ) = $day 
OR  `user`.`fname` = 
( SELECT  `name`.`names` 
  FROM  `wp_class_namedays`  `name` 
  WHERE  `name`.`day` =  '$month.$day'
  AND  `user`.`fname` =  `name`.`names` )

```

This query grabs data from three different database tables to check if there is someone in the database, who has a party today. And in Latvia we have Name Days too. Anyway, this query works well, and does its job well, but now I want to make it a bit cooler. 

I want it to show, who will be having a party next week. You've probably noticed these emails that Facebook sends to you every weekend showing who has a birthday coming up.

But I just can't understand how to get at least that interval?

I remember that PHP has some good functions with which you can find on which day starts month and so on, but maybe here are some bright heart, and willing to help me kick me a bit faster forward.