Book Query part:
?
if (! $UploadAction):
?>
?
This procedure is for the output of the book title, author, publishing house information.
Editor: Kong Xiuxiang. Date: 2001/3/25
?>
<HTML><HEAD>
<TITLE> Bibliography Search </TITLE>
</HEAD>
<body><table align=center>
<form enctype= "multipart/form-data" NAME = "SubmitForm"
Action= ". $PHP _self?> "method =" POST ">
<input type= "hidden" NAME = "max_file_size" VALUE = "20000000" >
<input type= "hidden" NAME = "uploadaction" VALUE = "1" >
<!--tr><td> filename <td><input name = "UploadFile" TYPE = "file" value= "" SIZE = "></TR-->"
<TR><TD align=center> Works name <td><input name = "B_name" TYPE = "text" value= "" SIZE = "MAXLENGTH=100&G" T;</td></tr>
<tr><td align=center> author <TD> surname <input name = "A_first1" TYPE = "text" value= "" SIZE = "6" MAXLENGTH=20&G T
Name <input name = "A_last1" TYPE = "text" value= "" SIZE = "6" maxlength=20></td></tr>
<TR><TD align=center> Publishing house <td><input NAME = "P_name" TYPE = "text" value= "" SIZE = "MAXLENGTH=100&G" T;</td></tr>
<TR><TD> Publication date <td><input NAME = "P_year" TYPE = "text" value= "" SIZE = "4" > Year
<!--INPUT NAME = "P_month" TYPE = "text" value= "" SIZE = "2" > Month <-->
<tr><td>isbn<td><input NAME = "ISBN" TYPE = "text" value= "" SIZE = ">"
</table><table align=center>
<TR><TD align=center>
<input NAME = "submit" VALUE = "submit" TYPE = "Submit" >
<td><input NAME = "reset" VALUE = "reset" TYPE = "Reset" >
</TD></TR>
</FORM></CENTER></TABLE></BODY>
</HTML>
?
Else
Session_Start ();
Require "CONFIG.PHP3";
$b _price= $b _price_a. "." $b _price_b;
$UploadAction = 0;
$repeat = 0; Was it repeated.
$TimeLimit = 0; Set timeout limit time defaults to 30 seconds set to 0 when not limited
Set_time_limit ($TimeLimit);
@MYSQL_CONNECT ($hostname, $dbusername, $dbpassword) OR DIE ("Cannot connect to the database!") ");
@mysql_select_db ("$dbname") or Die ("Cannot select a database!") ");
$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=publisher.publisher_id and books.books_id=books_author.books_id and books_author.author_id=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";
if ($a _last1!= "")
$al = "Author.last_name=" $a _last1 "and";
if ($p _year!= "") {
$date _p= "books.date_pub rlike ' ^ $p _year.* ' and";
}
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 $pn $af $al $date _p $is books.publisher_id=publisher.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_query ($q);
if (! $r) {
echo "Query invalid <BR>";
Exit
}
if (mysql_num_rows ($r) <1) {
$msg = "There are no records to meet the requirements. ";
Xueroom_error_exit ($msg, $PHP _self);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.