//ค้นหาตามสำนักพิมพ์
if($type=="pub"){
$sql1="select bid,title,aid,langcode,pid from book,author,language,publisher where book.aid=author.aid and book.langcode=language.langcode and
book.pid=publisher.pid and name like '".$search."'";
$query1=mysql_query($sql1,$conn) or die("Query Failer!");
//ค้นหาตามชื่อหนังสือ
else if($type=="title"){
$sql2="select bid,title,aid,langcode,pid from book,author,language,publisher where book.aid=author.aid and book.langcode=language.langcode and
book.pid=publisher.pid and title like '".$search."'";
$query2=mysql_query($sql2,$conn) or die("Query Failer!");
//ค้นหาตามภาษา
else if($type=="lang"){
$sql3="select bid,title,aid,langcode,pid from book,author,language,publisher where book.aid=author.aid and book.langcode=language.langcode and
book.pid=publisher.pid and langname like '".$search."'";
$query3=mysql_query($sql3,$conn) or die("Query Failer!");
//ค้นหาตามผู้แต่ง
else if($type=="auth"){
$sql4="select bid,title,aid,langcode,pid from book,author,language,publisher where book.aid=author.aid and book.langcode=language.langcode and
book.pid=publisher.pid and firstname like '".$search."'";
$query4=mysql_query($sql4,$conn) or die("Query Failer!");