圖書查詢部分:
if(!$UploadAction):
?>
//本程式是為輸出書名,作者、出版社資料而設。
//編者:孔秀祥。日期:2001/3/25
?>
書目查詢
else:
session_start() ;
require "config.php3";
$b_price=$b_price_a.".".$b_price_b;
$ / /是不是重複了。
$TimeLimit=0; //設定逾時限制時間缺省時間為30秒設定為0時為不限時
set_time_limit($TimeLimit);
@MYSQL_CONNECT($hostname,$dbusername,$dbpassword ) OR DIE("不能連接資料庫!");
@mysql_select_db("$dbname") or die("不能選擇資料庫!");
//$q="select books.books_id, books. books_name,author.first_name,author.last_name,publisher.publisher_name from books,author,books_author,publisher where books.books_name="$b_name" and books.publisher_id=publiidsher.publisher_id and books.book_horbook. =author.author_id";
if($b_name!="")
$bn="books.books_name="$b_name" and ";
if($p_name!="")
$pn="publisher.publisher_name="$p_name" and ";
if($a_first1!="")
$af="author.first_name="$a_first1" and "; ($a_last1!="")
$al="author.last_name="$a_last1" and ";
if($p_year!=""){
$date_p="books.date_pubrlikes.date_pubrlikes. '^$p_year.*' 和 ";
}
if($isbn!="")
$is="books.ISBN="$isbn" and ";
$q= "select books.books_id, books.books_name,author.first_name,author.last_name,publisher.publisher_name from books,author,books_author,publisher
where $bn $pnaf $ .publisher_id and books.books_id=books_author.books_id and books_author.author_id=author.author_id order by books.books_name";
$r = @mysql_$r = @mysql $r){
echo "查詢無效
";
exit;
}
if(mysql_num_rows($r) 記錄。 ";
xueroom_error_exit($msg,$PHP_SELF);
}
while($count=mysql_fetch_array($r)){🎜>while($count=mysql_fetch_array($r)){Š; ;
$books_name=$count[1];
$first_name=$count[2];
$last_name=$count[3];
$last_name=$count[3];
$last_name=$count[3];
$last_name=$count[3];
🎜> if($book!=$books_id){
$repeat ;
name."》";
echo "出版社:".$count[4];
echo " 作者:"; }
echo"
回傳";
echo"