SELECT idcode_pb
FROM order,
(SELECT idcompany
FROM company_user
WHERE
company_user.compa_name = 'สหกิจ') AS B
WHERE
B.idcompany = order.order_idcompany
$strSQL = "SELECT * FROM `order`, (SELECT idcompany FROM company_user WHERE (`order`.order_idcompany LIKE '%".$_GET["txtKeyword"]."%' or (`order`.company_general LIKE '%".$_GET["txtKeyword"]."%' ) AS B WHERE B.idcompany = order.order_idcompany
order by idcode_pb DESC ";