I am trying to get registerd users during the last 7 days so I have the users table

```
+-----+------------+--------------+
| ID  | USERNAME   | ADDED        |
+-----+------------+--------------+
|  1  | Vlad       | 1347386878   |
+-----+------------+--------------+
|  2  | Test       | 1347386578   |
+-----+------------+--------------+

```

I tried below sql but the output is empty, no errors... and I need something descending from today to 7 days ago

```
SELECT date(added), COUNT(id) AS num_registered 
FROM users 
WHERE added < CURDATE() 
AND added > CURDATE() - INTERVAL 7 DAYS 
GROUP BY date(added) LIMIT 1, 7

```

Any suggestions how to do this?

**EDIT:**

```
$mysql_query = mysql_query('SELECT added, DATE(added), COUNT(id) AS num_reg FROM users_test WHERE added < (UNIX_TIMESTAMP() - (7 * 24 * 60 * 60)) GROUP BY DATE(added) LIMIT 1, 7') or die(mysql_error());
while($row = mysql_fetch_array($mysql_query))
{
    $month = date('F', $row['added']);
    $day = date('j', $row['added']);
    $textbuilder .= '
    <li>
        <a href="#" title="'.$month.' '.$day.', '.$row['num_reg'].' registered">
            <span class="label">'.$day.'</span>
            <span class="count" style="height: 20%">('.$row['num_reg'].')</span>
        </a>
    </li>';
}

```

**TABLE:**

```
CREATE TABLE IF NOT EXISTS `users_test` (
  `id` int(10) NOT NULL,
  `username` varchar(60) NOT NULL,
  `added` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `users_test` (`id`, `username`, `added`) VALUES
(1, 'Test', 1347303641),
(2, 'Test1', 1347217241),
(3, 'Test2', 1347130841),
(4, 'Test3', 1347044441);

```