查询多个日期变量

I'm quite new to PHP and MySQL. I'm stuck with a problem, i will try to explain my problem.

 TODAY = 2013-01-13 18:37:00
 PRODUCT = P000001

TABEL : ASSEMBLY

  -----------------------------------------------------------------
  ∣ PRODUCT ∣ COMPONENT ∣      BEINFORCE      ∣     WILLEXPIRE      ∣
  -----------------------------------------------------------------
  ∣ P000001 ∣ C000001   ∣ 2013-01-01 18:37:00 ∣ 0000-00-00 00:00:00 ∣
  -----------------------------------------------------------------
  ∣ P000001 ∣ C000002   ∣ 2013-02-01 18:37:00 ∣ 0000-00-00 00:00:00 ∣
  -----------------------------------------------------------------
  ∣ P000001 ∣ C000003   ∣ 2013-01-01 18:37:00 ∣ 2013-01-10 18:37:00 ∣
  -----------------------------------------------------------------

Output must be:

  -----------------------------------------------------------------
  ∣ PRODUCT ∣ COMPONENT ∣      BEINFORCE      ∣     WILLEXPIRE      ∣
  -----------------------------------------------------------------
  ∣ P000001 ∣ C000001   ∣ 2013-01-01 18:37:00 ∣ 0000-00-00 00:00:00 ∣
  -----------------------------------------------------------------

Query from table ASSEMBLY must check PRODUCT, BEINFORCE and WILLEXPIRE and output table.

If I understand you correctly, including the comment below your question, then you want those rows of ASSEMBLY which

  1. have a BEINFORCE less than or equal to TODAY
  2. have a WILLEXPIRE which is zero, which I take to denote a date in the future
  3. match the PRODUCT you requested

You can achieve this using the following query, assuming user variables to represent your parameters. You could of course use prepared query placeholders as well.

SELECT *
FROM ASSEMBLY
WHERE BEINFORCE <= @TODAY
  AND WILLEXPIRE = '0000-00-00 00:00:00'
  AND PRODUCT = @PRODUCT