1 Attachment(s)
if same product in multiple rows and contain invoice number
hi all
i am showing results of purchases made by customer.
Code:
$qry = "select * from mytable"
$result = mysql_query($qry);
while($row=mysql_fetch_array($result)
{
echo $row['user_name'];
echo $row['product_name'];
echo $row['price'];
echo $row['quantity'];
echo $row['invoice_number'];
echo $row['status'];
}
Attachment 5922
In the above screeshot
the product "samsung s4 white" is contained in two rows
but one row has invoice number and other row does not have invoice number.
So what i want is
if same product name is contained in two rows and one of them has invoice number
then these both rows should not get display and also the row containing same invoice number should not display.
means all 3 rows should be omitted.
so how to check that same product product is in another row but that row also contains invoice number.
so what should i write in the "if condition"
Code:
if(invoice number contained same product)
{
}
vineet