<?php 
/****************************************************************/
/*          e-mo.pl © 2017                                      */
/*          http://www.e-mo.com.pl                              */
/*          e-mail: info@e-mo.pl                                */
/*          produkt: Action2osCommerce                          */
/*          wersja: 1.9.7                                       */
/*          webserwis: oscGold                                  */
/*          sciezka: https://www.e-mo.com.pl/plikit,1918,533545b244d7d.php*/
/*          data: 2017-09-25                                    */
/*          godz: 10:45:23                                      */
/****************************************************************/

class dok_cechy { 
	public $Conn = 0;
	public $errMsg = '';
	public $errNo= 0;
	public $dc_Id=0;
	public $dc_Linia=0;
	public $dc_Cecha=0;
	public $dc_Wartosc=0;
	public $dc_Cecha2=0;
	public $dc_Wartosc2=0;

	
	public function Linia($_linia){
		$zwrot=true;
		$query="Select products_options as nazwa, products_options_values as wartosc from orders_products_attributes Where orders_products_id=:Linia";
		$sth = $this->Conn->prepare($query);
		
		$sth->bindParam(':Linia', $_linia, PDO::PARAM_INT);
		$sth->execute();
		$tablica = array();
		$x=0;
		$z=0;
		while ($row = $sth->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT))
		{			
			

			foreach ($row as $k => $v)
			{
				if($z==0)
					$xx = $k;
				else
					$xx = $k.'2';

				$tablica[$x][$xx]=trim($v);
			}
			
			
			if($z==1)
			{	
				$x++; 
				$z=0;
			}
			$z++;
		}
				
		return $tablica;
	} 	
	

}
?>
