Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 19.97 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting( E_ALL );
  4. ini_set( 'display_errors', 1 );
  5. //ini_set("mysqli.default_port", 3310);
  6.    
  7. class DBase {
  8.    
  9.     const HOST  = '';
  10.     const USER  = '';
  11.     const PASS  = '';
  12.     const NAME  = '';
  13.    
  14.     private static $instance;
  15.        
  16.     public static function instance()
  17.     {
  18.         if (!isset(DBase::$instance)) {
  19.             $db = array(
  20.                 'host' => static::HOST,
  21.                 'user' => static::USER,
  22.                 'pass' => static::PASS,
  23.                 'name' => static::NAME,
  24.             );
  25.             self::connect($db);
  26.         }
  27.         return DBase::$instance;
  28.     }
  29.  
  30.  // $asArray - возвращать объект или массив
  31.  
  32.     public static function select($query, $asArray = false)
  33.     {
  34.         $mysqli_result = self::instance()->query($query);
  35.         if ($mysqli_result) {
  36.             $r = array();
  37.             while ($row = $mysqli_result->fetch_object()) {
  38.                 $r[] = $asArray ? (array) $row : $row;
  39.             }
  40.             return $r;
  41.         }
  42.         return array();
  43.     }
  44.  
  45.     public static function selectRow($query, $asArray = false)
  46.     {
  47.         $mysqli_result = self::instance()->query($query);
  48.         if ($mysqli_result) {
  49.             $row = $mysqli_result->fetch_row();
  50.             if ($row) {
  51.                 if ($asArray) {
  52.                     return (array) $row;
  53.                 }
  54.                 else {
  55.                     return $row;
  56.                 }
  57.             }
  58.         }
  59.         return array();
  60.     }
  61.  
  62.     public static function selectCol($query)
  63.     {
  64.         $rows = self::select($query,true);
  65.         return array_map(function ($row) {return array_shift($row);}, $rows);
  66.     }
  67.  
  68.     public static function selectCell($query)
  69.     {
  70.         $mysqli_result = self::instance()->query($query);
  71.         if($mysqli_result) {
  72.             $row = $mysqli_result->fetch_row();
  73.             if ($row) {
  74.                 return $row[0];
  75.             }
  76.         }
  77.         return NULL;
  78.     }
  79.  
  80.     public static function query($query)
  81.     {
  82.         return self::instance()->query($query);
  83.     }
  84.  
  85.     public static function connect(array $db)
  86.     {
  87.         $mysqli = new mysqli($db['host'], $db['user'], $db['pass'], $db['name']);
  88.  
  89.         if (!$mysqli->connect_error) {
  90.             $mysqli->set_charset("utf8");
  91.             DBase::$instance = $mysqli;
  92.         }
  93.         return $mysqli;
  94.     }
  95. }
  96.  
  97. class Tecdoc extends DBase {
  98.    
  99.    
  100. //====================================//
  101. // (1) АВТОМОБИЛИ
  102. //===================================//
  103.    
  104.    
  105.     // (1.1) Марки авто (производители)
  106.     static function getMakes( $type )
  107.         {
  108.             switch ($type) {
  109.             case 'passenger':
  110.                 $where = " AND ispassengercar = 'True'";
  111.                 break;
  112.             case 'commercial':
  113.                 $where = " AND iscommercialvehicle = 'True'";
  114.                 break;
  115.             case 'motorbike':
  116.                 $where = " AND ismotorbike  = 'True' AND haslink = 'True'";
  117.                 break;
  118.             case 'engine':
  119.                 $where = " AND isengine = 'True'";
  120.                 break;
  121.             case 'axle':
  122.                 $where = " AND isaxle = 'True'";
  123.                 break;
  124.  
  125.             }
  126.            
  127.             $order = $type == 'motorbike' ? 'description' : 'matchcode';
  128.            
  129.             return parent::select("
  130.                 SELECT id, description name
  131.                 FROM manufacturers
  132.                 WHERE canbedisplayed = 'True' " . $where . "
  133.                 ORDER BY " . $order);
  134.         }
  135.        
  136.     // (1.2) Модели авто  
  137.     static function getModels( $make_id, $type, $pattern = null )
  138.         {
  139.        
  140.             switch ($type) {
  141.             case 'passenger':
  142.                 $where = " AND ispassengercar = 'True'";
  143.                 break;
  144.             case 'commercial':
  145.                 $where = " AND iscommercialvehicle = 'True'";
  146.                 break;
  147.             case 'motorbike':
  148.                 $where = " AND ismotorbike  = 'True'";
  149.                 break;
  150.             case 'engine':
  151.                 $where = " AND isengine = 'True'";
  152.                 break;
  153.             case 'axle':
  154.                 $where = " AND isaxle = 'True'";
  155.                 break;
  156.  
  157.             }
  158.            
  159.             if( $pattern != null ) $where .= " AND description LIKE '" . $pattern . "%'";
  160.  
  161.             return parent::select("
  162.                 SELECT id, description name, constructioninterval
  163.                 FROM models
  164.                 WHERE canbedisplayed = 'True'
  165.                 AND manufacturerid = " . (int)$make_id . " " . $where . "
  166.                 ORDER BY description");
  167.         }
  168.    
  169.     // (1.3) Модификации авто
  170.     static function getModifications( $model_id, $type ){
  171.         switch ($type) {
  172.             case 'passenger':
  173.                 return parent::select("
  174.                     SELECT id, fulldescription name, a.attributegroup, a.attributetype, a.displaytitle, a.displayvalue
  175.                     FROM passanger_cars pc
  176.                     LEFT JOIN passanger_car_attributes a on pc.id = a.passangercarid
  177.                     WHERE canbedisplayed = 'True'
  178.                     AND modelid = " . (int)$model_id . " AND ispassengercar = 'True'");
  179.                 break;
  180.             case 'commercial':
  181.                 return parent::select("
  182.                     SELECT id, fulldescription name, a.attributegroup, a.attributetype, a.displaytitle, a.displayvalue
  183.                     FROM commercial_vehicles cv
  184.                     LEFT JOIN commercial_vehicle_attributes a on cv.id = a.commercialvehicleid
  185.                     WHERE canbedisplayed = 'True'
  186.                     AND modelid = " . (int)$model_id . " AND iscommercialvehicle = 'True'");
  187.                 break;
  188.             case 'motorbike':
  189.                 return parent::select("
  190.                     SELECT id, fulldescription name, a.attributegroup, a.attributetype, a.displaytitle, a.displayvalue
  191.                     FROM motorbikes m
  192.                     LEFT JOIN motorbike_attributes a on m.id = a.motorbikeid
  193.                     WHERE canbedisplayed = 'True'
  194.                     AND modelid = " . (int)$model_id . " AND ismotorbike = 'True'");
  195.                 break;
  196.             case 'engine':
  197.                 return parent::select("
  198.                     SELECT id, fulldescription name, salesDescription, a.attributegroup, a.attributetype, a.displaytitle, a.displayvalue
  199.                     FROM engines e
  200.                     LEFT JOIN engine_attributes a on e.id= a.engineid
  201.                     WHERE canbedisplayed = 'True'
  202.                     AND manufacturerId = " . (int)$model_id . " AND isengine = 'True'");
  203.                 break;
  204.             case 'axle':
  205.                 return parent::select("
  206.                     SELECT id, fulldescription name, a.attributegroup, a.attributetype, a.displaytitle, a.displayvalue
  207.                     FROM axles ax
  208.                     LEFT JOIN axle_attributes a on ax.id= a.axleid
  209.                     WHERE canbedisplayed = 'True'
  210.                     AND modelid = " . (int)$model_id . " AND isaxle = 'True'");
  211.                 break;
  212.  
  213.             }
  214.     }
  215.    
  216.     // (1.4) Марка по ID
  217.     static function getMake( $id, $type )
  218.         {
  219.             switch ($type) {
  220.             case 'passenger':
  221.                 $where = " AND ispassengercar = 'True'";
  222.                 break;
  223.             case 'commercial':
  224.                 $where = " AND iscommercialvehicle = 'True'";
  225.                 break;
  226.             case 'motorbike':
  227.                 $where = " AND ismotorbike  = 'True' AND haslink = 'True'";
  228.                 break;
  229.             case 'engine':
  230.                 $where = " AND isengine = 'True'";
  231.                 break;
  232.             case 'axle':
  233.                 $where = " AND isaxle = 'True'";
  234.                 break;
  235.  
  236.             }
  237.             return parent::select("
  238.                 SELECT id, description name
  239.                 FROM manufacturers
  240.                 WHERE canbedisplayed = 'True' " . $where . " AND id = " . (int)$id . ";
  241.             ");
  242.         }  
  243.        
  244.     // (1.5) Модель по ID
  245.     static function getModel( $id, $type ){
  246.        
  247.             switch ($type) {
  248.                 case 'passenger':
  249.                     $where = " AND ispassengercar = 'True'";
  250.                     break;
  251.                 case 'commercial':
  252.                     $where = " AND iscommercialvehicle = 'True'";
  253.                     break;
  254.                 case 'motorbike':
  255.                     $where = " AND ismotorbike  = 'True'";
  256.                     break;
  257.                 case 'engine':
  258.                     $where = " AND isengine = 'True'";
  259.                     break;
  260.                 case 'axle':
  261.                     $where = " AND isaxle = 'True'";
  262.                     break;
  263.  
  264.                 }
  265.                
  266.             return parent::select("
  267.                 SELECT id, description name, constructioninterval
  268.                 FROM models
  269.                 WHERE canbedisplayed = 'True' " . $where . " AND id = " . (int)$id . "
  270.             ");
  271.     }
  272.    
  273.     // (1.6) Модификация по ID
  274.     static function getType( $id, $type ){
  275.         switch ($type) {
  276.             case 'passenger':
  277.                 return parent::select("
  278.                     SELECT id, fulldescription name, a.attributegroup, a.attributetype, a.displaytitle, a.displayvalue
  279.                     FROM passanger_cars pc
  280.                     LEFT JOIN passanger_car_attributes a on pc.id = a.passangercarid
  281.                     WHERE canbedisplayed = 'True'
  282.                     AND id = " . (int)$id . " AND ispassengercar = 'True'");
  283.                 break;
  284.             case 'commercial':
  285.                 return parent::select("
  286.                     SELECT id, fulldescription name, a.attributegroup, a.attributetype, a.displaytitle, a.displayvalue
  287.                     FROM commercial_vehicles cv
  288.                     LEFT JOIN commercial_vehicle_attributes a on cv.id = a.commercialvehicleid
  289.                     WHERE canbedisplayed = 'True'
  290.                     AND id = " . (int)$id . " AND iscommercialvehicle = 'True'");
  291.                 break;
  292.             case 'motorbike':
  293.                 return parent::select("
  294.                     SELECT id, fulldescription name, a.attributegroup, a.attributetype, a.displaytitle, a.displayvalue
  295.                     FROM motorbikes m
  296.                     LEFT JOIN motorbike_attributes a on m.id = a.motorbikeid
  297.                     WHERE canbedisplayed = 'True'
  298.                     AND id = " . (int)$id . " AND ismotorbike = 'True'");
  299.                 break;
  300.             case 'engine':
  301.                 return parent::select("
  302.                     SELECT id, fulldescription name, salesDescription, a.attributegroup, a.attributetype, a.displaytitle, a.displayvalue
  303.                     FROM engines e
  304.                     LEFT JOIN engine_attributes a on e.id = a.engineid
  305.                     WHERE canbedisplayed = 'True'
  306.                     AND id = " . (int)$id . " AND isengine = 'True'");d . " AND parentId=" . (int)$parent . "
  307.                         ORDER BY havechild
  308.                     ");
  309.                     break;
  310.                 case 'motorbike':
  311.                     return parent::select("
  312.                         SELECT id, description,
  313.                         IF(EXISTS(SELECT * FROM motorbike_trees t1
  314.                         INNER JOIN motorbike_trees t2 ON t1.parentid=t2.id WHERE t2.parentid=" . (int)$parent . " AND t1.motorbikeid=" . (int)$modification_id . " LIMIT 1), 1, 0) AS havechild
  315.                         FROM motorbike_trees WHERE motorbikeid=" . (int)$modification_id . " AND parentId=" . (int)$parent . "
  316.                         ORDER BY havechild
  317.                     ");
  318.                     break;
  319.                 case 'engine':
  320.                     return parent::select("
  321.                         SELECT id, description,
  322.                         IF(EXISTS(SELECT * FROM engine_trees t1
  323.                         INNER JOIN engine_trees t2 ON t1.parentid=t2.id WHERE t2.parentid=" . (int)$parent . " AND t1.engineid=" . (int)$modification_id . " LIMIT 1), 1, 0) AS havechild
  324.                         FROM engine_trees WHERE engineid=" . (int)$modification_id . " AND parentId=" . (int)$parent . "
  325.                         ORDER BY havechild
  326.                     ");
  327.                     break;
  328.                 case 'axle':
  329.                     return parent::select("
  330.                         SELECT id, description,
  331.                         IF(EXISTS(SELECT * FROM axle_trees t1
  332.                         INNER JOIN axle_trees t2 ON t1.parentid=t2.id WHERE t2.parentid=" . (int)$parent . " AND t1.axleid=" . (int)$modification_id . " LIMIT 1), 1, 0) AS havechild
  333.                         FROM axle_trees WHERE axleid=" . (int)$modification_id . " AND parentId=" . (int)$parent . "
  334.                         ORDER BY havechild
  335.                     ");
  336.                     break;
  337.  
  338.                 }
  339.         }
  340.        
  341.     // (2.2) Название раздела по ID - используется в СЕО
  342.     static function getSectionName( $section_id, $type )
  343.         {
  344.             switch ($type) {
  345.                 case 'passenger':
  346.                     return parent::selectCell("SELECT description FROM passanger_car_trees WHERE id=" . (int)$section_id . " LIMIT 1");
  347.                     break;
  348.                 case 'commercial':
  349.                     return parent::selectCell("SELECT description FROM commercial_vehicle_trees WHERE id=" . (int)$section_id . " LIMIT 1");
  350.                     break;
  351.                 case 'motorbike':
  352.                     return parent::selectCell("SELECT description FROM motorbike_trees WHERE id=" . (int)$section_id . " LIMIT 1");
  353.                     break;
  354.                 case 'engine':
  355.                     return parent::selectCell("SELECT description FROM engine_trees WHERE id=" . (int)$section_id . " LIMIT 1");
  356.                     break;
  357.                 case 'axle':
  358.                     return parent::selectCell("SELECT description FROM axle_trees WHERE id=" . (int)$section_id . " LIMIT 1");
  359.                     break;
  360.  
  361.                 }
  362.         }
  363.  
  364.     // (2.3) Поиск запчастей раздела
  365.     static function getSectionParts( $modification_id, $section_id, $type )
  366.         {
  367.             switch ($type) {
  368.                 case 'passenger':
  369.                     return parent::select(" SELECT al.datasupplierarticlenumber part_number, s.description supplier_name, prd.description product_name
  370.                                             FROM article_links al
  371.                                             JOIN passanger_car_pds pds on al.supplierid = pds.supplierid
  372.                                             JOIN suppliers s on s.id = al.supplierid
  373.                                             JOIN passanger_car_prd prd on prd.id = al.productid
  374.                                             WHERE al.productid = pds.productid
  375.                                             AND al.linkageid = pds.passangercarid
  376.                                             AND al.linkageid = " . (int)$modification_id . "
  377.                                             AND pds.nodeid = " . (int)$section_id . "
  378.                                             AND al.linkagetypeid = 2
  379.                                             ORDER BY s.description, al.datasupplierarticlenumber");
  380.                     break;
  381.                 case 'commercial':
  382.                     return parent::select(" SELECT al.datasupplierarticlenumber part_number, s.description supplier_name, prd.description product_name
  383.                                             FROM article_links al
  384.                                             JOIN commercial_vehicle_pds pds on al.supplierid = pds.supplierid
  385.                                             JOIN suppliers s on s.id = al.supplierid
  386.                                             JOIN commercial_vehicle_prd prd on prd.id = al.productid
  387.                                             WHERE al.productid = pds.productid
  388.                                             AND al.linkageid = pds.commertialvehicleid
  389.                                             AND al.linkageid = " . (int)$modification_id . "
  390.                                             AND pds.nodeid = " . (int)$section_id . "
  391.                                             AND al.linkagetypeid = 16
  392.                                             ORDER BY s.description, al.datasupplierarticlenumber");
  393.                     break;
  394.                 case 'motorbike':
  395.                     return parent::select(" SELECT al.datasupplierarticlenumber part_number, s.description supplier_name, prd.description product_name
  396.                                             FROM article_links al
  397.                                             JOIN motorbike_pds pds on al.supplierid = pds.supplierid
  398.                                             JOIN suppliers s on s.id = al.supplierid
  399.                                             JOIN motorbike_prd prd on prd.id = al.productid
  400.                                             WHERE al.productid = pds.productid
  401.                                             AND al.linkageid = pds.motorbikeid
  402.                                             AND al.linkageid = " . (int)$modification_id . "
  403.                                             AND pds.nodeid = " . (int)$section_id . "
  404.                                             AND al.linkagetypeid = 777
  405.                                             ORDER BY s.description, al.datasupplierarticlenumber");
  406.                     break;
  407.                 case 'engine':
  408.                     return parent::select(" SELECT pds.engineid, al.datasupplierarticlenumber part_number, prd.description product_name, s.description supplier_name
  409.                                             FROM article_links al
  410.                                             JOIN engine_pds pds on al.supplierid = pds.supplierid
  411.                                             JOIN suppliers s on s.id = al.supplierid
  412.                                             JOIN engine_prd prd on prd.id = al.productid
  413.                                             WHERE al.productid = pds.productid
  414.                                             AND al.linkageid = pds.engineid
  415.                                             AND al.linkageid = " . (int)$modification_id . "
  416.                                             AND pds.nodeid = " . (int)$section_id . "
  417.                                             AND al.linkagetypeid = 14
  418.                                             ORDER BY s.description, al.datasupplierarticlenumber");
  419.                     break;
  420.                 case 'axle':
  421.                     return parent::select(" SELECT pds.axleid, al.datasupplierarticlenumber part_number, prd.description product_name, s.description supplier_name
  422.                                             FROM article_links al
  423.                                             JOIN axle_pds pds on al.supplierid = pds.supplierid
  424.                                             JOIN suppliers s on s.id = al.supplierid
  425.                                             JOIN axle_prd prd on prd.id = al.productid
  426.                                             WHERE al.productid = pds.productid
  427.                                             AND al.linkageid = pds.axleid
  428.                                             AND al.linkageid = " . (int)$modification_id . "
  429.                                             AND pds.nodeid = " . (int)$section_id . "
  430.                                             AND al.linkagetypeid = 19
  431.                                             ORDER BY s.description, al.datasupplierarticlenumber");
  432.                     break;
  433.  
  434.                 }
  435.         }
  436.        
  437. //====================================//
  438. // (3) Информация об изделии
  439. //===================================//
  440.    
  441.     // (3.1) Оригинальные номера
  442.     static function getOemNumbers( $number, $brand_id )
  443.         {
  444.             return parent::select("
  445.                     SELECT m.description, a.OENbr FROM article_oe a
  446.                     JOIN manufacturers m ON m.id=a.manufacturerId
  447.                     WHERE a.datasupplierarticlenumber='" . $number . "' AND a.supplierid='" . $brand_id . "'
  448.                 ");
  449.         }      
  450.        
  451.     // (3.2) Статус изделия
  452.     static function getArtStatus( $number, $brand_id )
  453.         {
  454.             return parent::select("
  455.                     SELECT NormalizedDescription, ArticleStateDisplayValue FROM articles WHERE DataSupplierArticleNumber='" . $number . "' AND supplierId='" . $brand_id . "'
  456.                 ");
  457.         }  
  458.        
  459.     // (3.3) Характеристики изделия
  460.     static function getArtAttributes( $number, $brand_id )
  461.         {
  462.             return parent::select("
  463.                     SELECT attributeinformationtype, displaytitle, displayvalue FROM article_attributes WHERE datasupplierarticlenumber='" . $number . "'  AND a.supplierid='" . $brand_id . "'
  464.                 ");
  465.         }  
  466.        
  467.     // (3.4) Файлы изделия
  468.     static function getArtFiles( $number, $brand_id )
  469.         {
  470.             return parent::select("
  471.                     SELECT Description, PictureName FROM article_images WHERE DataSupplierArticleNumber='" . $number . "'  AND a.supplierId='" . $brand_id . "'
  472.                 ");
  473.         }
  474.        
  475.     // (3.5) Применимость изделия
  476.     static function getArtVehicles( $number, $brand_id )
  477.         {
  478.             $result = [];
  479.             $rows = parent::select("
  480.                     SELECT linkageTypeId, linkageId FROM article_li WHERE DataSupplierArticleNumber='" . $number . "' AND supplierId='" . $brand_id . "'
  481.                 ");
  482.             foreach ( $rows as &$row ){
  483.                 switch ($type) {
  484.                 case 'PassengerCar':
  485.                     $result[ $row['linkageTypeId'] ][] =  parent::select("SELECT DISTINCT p.id, mm.description make, m.description model, p.constructioninterval, p.description FROM passanger_cars p
  486.                                                                             JOIN models m ON m.id=p.modelid
  487.                                                                             JOIN manufacturers mm ON mm.id=m.manufacturerid
  488.                                                                             WHERE p.id=" . $row['linkageTypeId'] );
  489.                     break;
  490.                 case 'CommercialVehicle':
  491.                     $result[ $row['linkageTypeId'] ][] = parent::select("SELECT DISTINCT p.id, mm.description make, m.description model, p.constructioninterval, p.description FROM commercial_vehicles p
  492.                                                                             JOIN models m ON m.id=p.modelid
  493.                                                                             JOIN manufacturers mm ON mm.id=m.manufacturerid
  494.                                                                             WHERE p.id=" . $row['linkageTypeId'] );
  495.                     break;
  496.                 case 'Motorbike':
  497.                     $result[ $row['linkageTypeId'] ][] = parent::select("SELECT DISTINCT p.id, mm.description make, m.description model, p.constructioninterval, p.description FROM motorbikes p
  498.                                                                             JOIN models m ON m.id=p.modelid
  499.                                                                             JOIN manufacturers mm ON mm.id=m.manufacturerid
  500.                                                                             WHERE p.id=" . $row['linkageTypeId'] );
  501.                     break;
  502.                 case 'Engine':
  503.                     $result[ $row['linkageTypeId'] ][] = parent::select("SELECT DISTINCT p.id, m.description make, '' model, p.constructioninterval, p.description FROM `engines` p
  504.                                                                             JOIN manufacturers m ON m.id=p.manufacturerid
  505.                                                                             WHERE p.id=" . $row['linkageTypeId'] );
  506.                     break;
  507.                 case 'Axle':
  508.                     $result[ $row['linkageTypeId'] ][] = parent::select("SELECT DISTINCT p.id, mm.description make, m.description model, p.constructioninterval, p.description FROM axles p
  509.                                                                             JOIN models m ON m.id=p.modelid
  510.                                                                             JOIN manufacturers mm ON mm.id=m.manufacturerid
  511.                                                                             WHERE p.id=" . $row['linkageTypeId'] );
  512.                     break;
  513.  
  514.                 }              
  515.             }
  516.             return $result;
  517.         }  
  518.        
  519.     // (3.6) Замены изделия
  520.     static function getArtReplace( $number, $brand_id )
  521.         {
  522.             return parent::select("
  523.                     SELECT s.description supplier, a.replacenbr number FROM article_rn a
  524.                     JOIN suppliers s ON s.id=a.replacesupplierid
  525.                     WHERE a.datasupplierarticlenumber='" . $number . "' AND a.supplierid='" . $brand_id . "'
  526.                 ");
  527.         }
  528.        
  529.     // (3.7) Аналоги-заменители
  530.     static function getArtCross( $number, $brand_id )
  531.         {
  532.             return parent::select("
  533.                     SELECT DISTINCT s.description, c.PartsDataSupplierArticleNumber FROM article_oe a
  534.                     JOIN manufacturers m ON m.id=a.manufacturerId
  535.                     JOIN article_cross c ON c.OENbr=a.OENbr
  536.                     JOIN suppliers s ON s.id=c.SupplierId
  537.                     WHERE a.datasupplierarticlenumber='". $number ."' AND a.supplierid='" . $brand_id . "'
  538.                 ");
  539.         }  
  540.        
  541.     // (3.8) Комплектующие (части) изделия
  542.     static function getArtParts( $number, $brand_id )
  543.         {
  544.             return parent::select("
  545.                     SELECT DISTINCT description Brand, Quantity, PartsDataSupplierArticleNumber FROM article_parts
  546.                     JOIN suppliers ON id=PartsSupplierId
  547.                     WHERE DataSupplierArticleNumber='". $number ."' AND supplierId='" . $brand_id . "'
  548.                 ");
  549.         }
  550. }
  551.  
  552. //$foo = Tecdoc::getMakes('passenger');
  553. //echo '<pre>';
  554. //print_r($foo);
  555. //echo '</pre>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement