Q:

fetching x days ahead of current date record by comparing specific date from column of table

[apologies in advance for my english]
i have a column in my database table event_start_date (user input datetime) and my requirement is to get data of x days ahead of current datetime. and value of event_start_date in the resulting record should be greater than or equal to NOW() (current date time)  
`event_start_date >= NOW()`  (using php or mysql)

this is what i have done so far (zend in magento):

$sql = $read->select()
  ->from(array('e' => 'my_table'));
$where = "e.event_start_date = DATE(DATE_ADD(e.event_start_date,
  INTERVAL x DAY))";
$sql->where($where);
echo $sql->__toString();exit; // this results in 
SELECTe.* FROM 'my_table' AS 'e' WHERE (e.event_start_date =
  DATE(DATE_ADD(e.event_start_date, INTERVAL x DAY)))

another i used is 

SELECTe.* FROM 'my_table' AS 'e' WHERE 
  DATEDIFF(e.event_start_date,DATE(DATE_ADD(e.event_start_date, INTERVAL
  {$x} DAY)));

both output one row if x = 1 only. what would be the solution? i am kinda stuck.
appreciate your help a lot.
thanks,

A:

It should be something like:
SELECT * FROM table WHERE event_start_date BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 5 DAY)

Your statement:
DATEDIFF(e.event_start_date,DATE(DATE_ADD(e.event_start_date, INTERVAL {$x} DAY)));

actually means: "where start_date + 3 days is higher than start_date"
and it does not make much sense

