Jump to content

RinGo_SS__

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

RinGo_SS__'s Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi ~ Iam Noobie ^^ but check this: if you want show only the list of selected items ~ [code] $query = "SELECT * FROM dprices p, temporder t   WHERE p.companyname = t.companyname   AND p.companyname = '" . $companyname . "'   AND p.productsku = t.productsku   AND p.price > 0"; $result = mysql_query ($query); if (!$result) { echo "Query ERROR: " . mysql_error (); exit (); } while ($query_data = mysql_fetch_array ($result)) { echo "this item is selected: " . $query_data['productsku'] . " Price: " . $query_data['price'] . "<br />"; } [/code] and if you want show the list of selected items and no selected items [code] $query = "SELECT *, t.productsku as productskuSelected   FROM dprices p LEFT JOIN temporder t ON ( p.productsku = t.productsku AND p.companyname = t.companyname)   WHERE   AND p.companyname = '" . $companyname . "'   AND p.price > 0"; $result = mysql_query ($query); if (!$result) { echo "Query ERROR: " . mysql_error (); exit (); } while ($query_data = mysql_fetch_array ($result)) { if ($query_data['productskuSelected'] != NULL) { echo "this item is selected: " . $query_data['productsku'] . " Price: " . $query_data['price'] . "<br />"; } else { echo "this item is not selected: " . $query_data['productsku'] . " Price: " . $query_data['price'] . "<br />"; } } [/code] I hope this code and help you ~
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.