First, get the number of the current month with PHP's
date, then get the UNIX time of the first day in the current month and query the table for all entries which have a higher value in the time column.
There you go :-) .
PHP Code:
WHERE ".date('mY',."p.dateline".)." = $currentmonth
The reason why this doesn't work is the fact that p.dateline is no valid timestamp. Even it were, it wouldn't work since the query gets parsed by PHP and then it's being sent to the MySQL server, which returns the values for the queried fields. But date() needs the timestamp *before* the query is sent.
And btw, it doesn't work for a second reason: The value to the left has to be the name of a column, but i doubt date() will return the name of an already existing column.