我对 PHP 和 MySQL 很陌生。我遇到了一个问题,我会尝试解释我的问题。
TODAY = 2013-01-13 18:37:00
PRODUCT = P000001
表:组装
-----------------------------------------------------------------
∣ 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 ∣
-----------------------------------------------------------------
输出必须是:
-----------------------------------------------------------------
∣ PRODUCT ∣ COMPONENT ∣ BEINFORCE ∣ WILLEXPIRE ∣
-----------------------------------------------------------------
∣ P000001 ∣ C000001 ∣ 2013-01-01 18:37:00 ∣ 0000-00-00 00:00:00 ∣
-----------------------------------------------------------------
从表 ASSEMBLY 查询必须检查 PRODUCT、BEINFORCE 和 WILLEXPIRE 和输出表。