I would like to do the following dp query for a specific langauge_id . but didn't success to call the right variable.
$audience = array();
$products_query = tep_db_query("select distinct pn.customers_id, pn.notify_language_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where c.customers_id = pn.customers_id and pn.products_id in ( '" . (int)$products_id . "')");
while ($products = tep_db_fetch_array($products_query)) {
$audience[$products['customers_id']] = array('firstname' => $products['customers_firstname'],
'lastname' => $products['customers_lastname'],
'language_id' => $products['notify_language_id'],
'email_address' => $products['customers_email_address']);
}
anfter creating this array there is a db quiery:
$product_query_raw = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$products_id . "'");
$product = tep_db_fetch_array($product_query_raw);
now my problem is that i would like to use this variable stored in the above array to do the query for a certain language_id
'language_id' => $products['notify_language_id'],
so i think i need to know how to add this:
and pd.language_id = xxx
thanks for any help!






Find content
Not Telling

