$sql = "SELECT customer.*,receipt.* from customer inner join receipt on customer.ID_Cus=receipt.ID_Cus WHERE
(customer.Name_Cus and $search1 LIKE '%".$textsearch."%' or customer.ID_Cus and $search1 LIKE '%".$textsearch."%'
or customer.Tel_Cus and $search1 LIKE '%".$textsearch."%'or receipt.ID_Rec and $search1 LIKE '%".$textsearch."%')";
ผลการรัน
Column 'ID_Cus' in where clause is ambiguous