/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Description of temp-updates-desc2-clasp * * @author IT TEAM BONOFACTUM * @created Apr 16, 2014 5:51:39 PM */ global $db; require_once '../confy.php'; require_once '../functions.php'; require_once '../functions-2.php'; tep_db_connect(); use_class('products_minierp'); $class_pm = new products_minierp(); $query = 'SELECT DISTINCT p.products_id FROM products p'; $query .= ' INNER JOIN products_to_categories ptc ON ptc.products_id = p.products_id'; $query .= ' INNER JOIN products_description2 pd2 ON pd2.products_id = p.products_id'; $query .= ' INNER JOIN products_use_elements pue ON pue.products_id = p.products_id'; $query .= ' WHERE pd2.clasp_type = "0" AND ptc.categories_id = "2" AND p.active_status = "1" AND pue.elements_id IN (2615,4365,5597,650,675,3183,5559,1149,7101,1239,1240,652,653,732,1146)'; $result = tep_db_query($query); if (tep_db_num_rows($result) > 0) { while ($row = tep_db_fetch_array($result)) { $class_pm->setProductDescription2($row['products_id'], 'c'); echo "{$row['products_id']} OK <br>"; } echo "DONE"; }