$UploadAction=0; $repeat=0; //是不是重复了。 $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=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";