
                <?php
				 include 'config.php';
				$condX = $_POST['condX'];
				$conX = $_POST['conX'];
				$join_tbl = "`auto_tbl` RIGHT JOIN `recording` ON auto_tbl.record = recording.record";
				 $comment_arr=array();
                   
				if($conX==1){    
	
   $condX="";   
	$dealers=mysqli_query($conn,"SELECT * FROM recording");
	 
}

if($conX==2){
	
   $dealers=mysqli_query($conn,"SELECT * FROM $join_tbl WHERE $condX 1=1");   

}
				
$data_arr=array();
                 
                    if(mysqli_num_rows($dealers) > 0){
						
                        while($row = mysqli_fetch_array($dealers)){
							$recode_arr=array();
							
                            $id = $row['record']; 
                            $filename = $row['filename'];
                            $url = $row['url'];
							
							
							array_push($recode_arr,$id);
							array_push($recode_arr,$filename);
							array_push($recode_arr,$url);
							array_push($data_arr,$recode_arr);
                        
                         }
							
                    }

                  echo json_encode($data_arr);
                ?>
                    

               

