17-06-20, 03:01 PM
(آخر تعديل لهذه المشاركة : 17-06-20, 03:03 PM {2} بواسطة ahmedramzyaish.)
(17-06-20, 02:54 PM)asemshahen5 كتب : اضف هذا الاستعلام الى نهاية استعلامك لانه بصراحة جداولك و الفورم ليست عندي لاطبق عليها :اسف تعبك معاى بس الموضوع مهم جدا
PHP كود :
WHERE (ProductID > (SELECT MAX(ProductID) - 2 AS ProductID FROM Products AS Products_1))
هل تقصد كده
كود :
da = New SqlDataAdapter("select sum(val),sum(val1*exchange_price) from inv,inv_sub where " & CondBranch & " currency_from=" & dtt.Rows(i)(0) & _
" and inv.proc_type=1 and (ProductID > (SELECT MAX(currency_from) - 2 AS ProductID FROM inv AS Products_1)) and
inv_sub.proc_type=1 and inv.proc_id=inv_sub.proc_id and IS_Deleted=0", conn)