$sql_chk_mtck = mysql_query("SELECT a.id_p as p_a, b.id_p as p_b, a.id_memp, MIN(b.date) as date_last, b.status
FROM product as b
LEFT JOIN order as a
ON a.id_p = b.id_p
WHERE b.status = 1") or die (mysql_error());
$sql_chk_mtck = mysql_query("SELECT a.id_p as p_a, b.id_p as p_b, a.id_memp, MIN(b.date) as date_last, b.status
FROM product as b
LEFT JOIN order as a
ON a.id_p = b.id_p
WHERE b.status = 1 order by b.date asc") or die (mysql_error());