PHP Mysql SELECT上个月和用户选择的月份数据

I want to retrieve last month data and my combo-box selected month date

this is my code and this query is not working. i think the problem is in INTERVEL command. Please help me to use INTERVAL 1 MONTH correctly.

 $result = mysql_query("SELECT manufacturer,model, SUM(replace(payment_one,',','')) as payment_one FROM table1 WHERE
 YEAR(payment_one_date) = '$YYYY'- INTERVAL 1 MONTH AND
 MONTH(payment_one_date) = '$MM'-INTERVAL 1 MONTH AND
 payment_one_bank='CB'");
SELECT
        manufacturer,
        model,
        SUM(replace(payment_one,',','')) payment_one
    FROM table1
    WHERE (
        payment_one_date < '$YYYY-$MM-01 00:00:00' /* <-- can be incorrect for your field type */
            AND payment_one_date >= ('$YYYY-$MM-01 00:00:00' - INTERVAL 1 MONTH)
    ) AND payment_one_bank='CB'