<?php
$sqll_="select idcode_pb , check_st
from `order`
where idcode_pb NOT IN(select stock_idcode_pb from `stock`
UNION
select stock_idcode_pb_se from `stock_se`)
AND check_st != 1
Group by idcode_pb DESC";
$sqll_="SELECT idcode_pb, check_st FROM `order`
INNER JOIN `stock` ON `order`.idcode_pb = `stock`.stock_idcode_pb
LEFT JOIN `stock_se` ON `order`.idcode_pb = `stock_se`.stock_idcode_pb_se
WHERE check_st != 1 ";
$sqll_="SELECT idcode_pb, check_st FROM `order`
INNER JOIN `stock` ON `order`.idcode_pb != `stock`.stock_idcode_pb
LEFT JOIN `stock_se` ON `order`.idcode_pb != `stock_se`.stock_idcode_pb_se
WHERE check_st != 1
Group by idcode_pb DESC";