$sqlshow = "SELECT
`tbldocument`.`doc_code`, `tbldocument`.`doc_item`,
`tbldocument`.`doc_detail`, `tbldocument`.`doc_date`,
`tbldocument`.`doc_dateAcc`, `tbldocument`.`doc_depart`,
`tbldocument`.`doc_part`, `tbldocument`.`doc_name`,
`tbldocument`.`doc_newname`, `tbldocument`.`group_code`,
`tbldocument`.`type_code`, `tbldocument`.`head_code`, `tblgroup`.`group_name`,
`tbltype`.`type_name`, `tblhead`.`head_name`
FROM
`tbldocument` INNER JOIN
`tblhead` ON `tblhead`.`head_code` = `tbldocument`.`head_code` INNER JOIN
`tbltype` ON `tbltype`.`type_code` = `tbldocument`.`type_code` INNER JOIN
`tblgroup` ON `tblgroup`.`group_code` = `tbldocument`.`group_code`
WHERE
`tbldocument`.`group_code` = '$txtselect1' AND
`tbldocument`.`type_code` = '$txtselect2' AND
`tbldocument`.`head_code` LIKE '%$txtselect3%' AND
`tbldocument`.`doc_item` LIKE '%$nameno%' AND
`tbldocument`.`doc_detail` LIKE '%$name%'
ORDER BY
`tbldocument`.`doc_date` DESC LIMIT $Page_Start , $Per_Page";
$sqlshow = "SELECT
`tbldocument`.`doc_code`, `tbldocument`.`doc_item`,
`tbldocument`.`doc_detail`, `tbldocument`.`doc_date`,
`tbldocument`.`doc_dateAcc`, `tbldocument`.`doc_depart`,
`tbldocument`.`doc_part`, `tbldocument`.`doc_name`,
`tbldocument`.`doc_newname`, `tbldocument`.`group_code`,
`tbldocument`.`type_code`, `tbldocument`.`head_code`, `tblgroup`.`group_name`,
`tbltype`.`type_name`, `tblhead`.`head_name`
FROM
`tbldocument` INNER JOIN
`tblhead` ON `tblhead`.`head_code` = `tbldocument`.`head_code` INNER JOIN
`tbltype` ON `tbltype`.`type_code` = `tbldocument`.`type_code` INNER JOIN
`tblgroup` ON `tblgroup`.`group_code` = `tbldocument`.`group_code`
WHERE
`tbldocument`.`group_code` = '$txtselect1' AND
`tbldocument`.`type_code` = '$txtselect2' AND
`tbldocument`.`head_code` LIKE '%".$_GET[txtselect3]."%' AND
`tbldocument`.`doc_item` LIKE '%".$_GET[nameno]."%' AND
`tbldocument`.`doc_detail` LIKE '%".$_GET[name]."%'
ORDER BY
`tbldocument`.`doc_date` DESC LIMIT $Page_Start , $Per_Page";