  | 
              
	              
	                
  
    
	 
        Eror Parse error: syntax error, unexpected T_STRING in C:\AppServ\www\Resortioon\data.php on line 37     | 
   
  
    |   | 
   
 
 
 
              
  
          
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 บรรทัด 38 ด้วยครับ                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-01 15:40:46 | 
                        By :
                            zoneteendome | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 ถ้ามองไม่ผิดไม่ได้ปิด <a href="#"></a>ตรงคอนเฟริม Delect                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-01 15:55:59 | 
                        By :
                            nobetaking | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 ขอรอบกวนหน่อยค่ะ ถ้าจะเขียนเพิ่่มเงื่อนไขการค้นหา วันที่จะเพิ่มยังไงค่ะ 
Code (PHP) 
select room_school.* from room_school left join room_school2 on room_school.m_type_id = room_school2.m_type_id where room_school.m_type_id
                         
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-01 16:03:20 | 
                        By :
                            P.no 01102559 | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 ช่วยหน่อยครับมันเป็นโปรเจค                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-01 16:03:22 | 
                        By :
                            zoneteendome | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 แก้ได้แล้วครับ                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-01 16:07:27 | 
                        By :
                            zoneteendome | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                   
Code (PHP) 
<?php
$connect = mysqli_connect("localhost", "root", "1234", "ioonresort");
$output = '';
if(isset($_POST["query"]))
{
	$search = mysqli_real_escape_string($connect, $_POST["query"]);
	$query = "
	SELECT * FROM customer
	WHERE CustomerName LIKE '%".$search."%'
	OR CustomerSurName LIKE '%".$search."%'
	";
}
else
{
	$query = "
	SELECT * FROM customer ORDER BY CustomerID";
}
$result = mysqli_query($connect, $query);
if(mysqli_num_rows($result) > 0)
{
	$output .= '<div class="table-responsive">
					<table class="table table bordered">
						<tr>
							<th>รหัสลูกค้า</th>
							<th>ชื่อ</th>
							<th>นามสกุล</th>
							<th>แก้ไข Code</th>
							<th>ลบ</th>
						</tr>';
	while($row = mysqli_fetch_array($result))
	{
		$output .= '
			<tr>
				<td>'.$row["CustomerID"].'</td>
				<td>'.$row["CustomerName"].'</td>
				<td>'.$row["CustomerSurName"].'</td>
				<td>'?><a href ='UpdateCustomer.php?id=".$row['CustomerID']."'><div class='img-resize'><img src='img/edit.png'></div></a><?'</td>
      <td>'?><a href="JavaScript:if(confirm('Confirm Delete?')==true){window.location='DeleteDeviceType.php?id=<?php echo $row['CustomerID'];?>';}"><div class='img-resize'><img src='img/delete.png'></div></a><?'</td>
			</tr>';
	}
	echo $output;
}
else
{
	echo 'Data Not Found';
}
?>
 
แต่เป็นยังงี้อะครับ                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-01 16:09:59 | 
                        By :
                            zoneteendome | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 ลองเอาตัวนี้ไปลอง รันดูครับว่าได้ผลเป็นอย่างไรบ้าง 
Code (PHP) 
<?php
$connect = mysqli_connect("localhost", "root", "1234", "ioonresort");
if(isset($_POST["query"]))
{
	$search = mysqli_real_escape_string($connect, $_POST["query"]);
	$query = "SELECT * FROM customer WHERE CustomerName LIKE '%".$search."%'OR CustomerSurName LIKE '%".$search."%'";
}
else
{
	$query = "SELECT * FROM customer ORDER BY CustomerID";
}
$result = mysqli_query($connect, $query);
if(mysqli_num_rows($result) > 0)
{
	?>
	<div class="table-responsive">
		<table class="table table bordered">
			<tr>
				<th>รหัสลูกค้า</th>
				<th>ชื่อ</th>
				<th>นามสกุล</th>
				<th>แก้ไข Code</th>
				<th>ลบ</th>
			</tr>
		<?php
		while($row = mysqli_fetch_array($result))
		{
		?>
		<tr>
			<td><?php echo $row["CustomerID"];?></td>
			<td><?php echo $row["CustomerName"];?></td>
			<td><?php echo $row["CustomerSurName"];?></td>
			<td><a href ='UpdateCustomer.php?id=<?php echo $row['CustomerID'];?>'><div class='img-resize'><img src='img/edit.png'></div></a></td>
			<td><a href="JavaScript:if(confirm('Confirm Delete?')==true){window.location='DeleteDeviceType.php?id=<?php echo $row['CustomerID'];?>';}"><div class='img-resize'><img src='img/delete.png'></div></a></td>
		</tr>
	</div>
	<?php
		}
}
else
{
	echo 'Data Not Found';
}
?>
                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-02 09:27:29 | 
                        By :
                            nobetaking | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
      		  
	
     | 
   
 
                 |