2tonejoe Posted February 28, 2008 Share Posted February 28, 2008 <?php function isval($inp){ if(isset($inp)){ $len = strlen($inp); if($len > 0){ return true; } else{ return false; } } else{ return false; } } include('db-connect.php'); $year = $_POST['year']; $issue = $_POST['issue']; $bookCode = $_POST['bookCode']; $bookSection = $_POST['bookSection']; $ioBarcode = $_POST['ioBarcode']; $adName = $_POST['adName']; $account = $_POST['account']; if(isval($account)){ $WHERE[] = "ad_info.account_number LIKE '%$account%'"; } if(isval($adName)){ $WHERE[] = "ad_info.ad_name LIKE '%$adName%'"; } if(isval($bookCode)){ $WHERE[] = "ad_info.book_code = '$bookCode'"; } if(isval($bookSection)){ $WHERE[] = "ad_info.book_type = '$bookSection'"; } if(isval($ioBarcode)){ $WHERE[] = "ad_info.io_barcode LIKE '%$ioBarcode%'"; } if(isval($year)){ $WHERE[] = "ad_info.book_year = '$year'"; } if(isval($issue)){ $WHERE[] = "ad_info.book_issue = '$issue'"; } mysql_select_db($mysql_database) or die('Could not select database'); $result = mysql_query("SELECT ad_info.clock, ad_info.book_code, ad_info.id, ad_info.book_version, ad_info.book_type, ad_info.book_year, ad_info.book_issue, ad_info.page_number, ad_info.ad_name, ad_info.io_barcode, ad_info.account_number, ad_info.city, book_info.pdf_path, book_info.jpg_path, book_info.thumb_path, book_info.book_center, book_info.file_name FROM ad_info INNER JOIN book_info ON ad_info.book_code = book_info.book_code AND ad_info.book_version = book_info.book_version AND ad_info.book_type = book_info.book_type AND ad_info.book_year = book_info.book_year AND ad_info.book_issue = book_info.book_issue WHERE ".implode(" AND ", $WHERE)." ORDER BY ad_info.page_number ASC LIMIT 0,200") or die(mysql_error()); echo <<<END <link rel="stylesheet" type="text/css" href="../css/tearsheets.css" /> <link rel="stylesheet" type="text/css" href="../css/lightwindow.css" /> <script type="text/javascript" src="../js/prototype.js"></script> <script type="text/javascript" src="../js/effects.js"></script> <script type="text/javascript" src="../js/lightwindow.js"></script> <script type="text/javascript" src="../js/sortable.js"></script> <div class="style2">Your Search Results</div><br /> <table align="center" width="100%" class="sortable" id="tableMain" cellpadding="4" cellspacing="0"> <tr class="tableFontHeader"> <th>Book</th> <th>Issue</th> <th>Version</th> <th>Section</th> <th class="unsortable">On Page</th> <th>IO/Barcode</th> <th> Name </th> <th>Account</th> <th>Actions</th> <th>Updated</th> </tr> END; $county = mysql_num_rows($result); while($row = mysql_fetch_array( $result )) { echo "<tr class='tableFont'><td id='tableMain'><center>"; echo " ".$row['book_code']; echo "</td><center><td id='tableMain'><center>"; echo " ".$row['book_issue']; echo "</td><center><td id='tableMain'><center>"; echo " ".$row['book_version']; echo "</td><center><td id='tableMain'><center>"; echo " ".$row['book_type']; echo "</td><center><td id='tableMain'><center>"; echo " ".$row['page_number']; echo "</td><center><td id='tableMain'><center>"; echo " ".$row['io_barcode']; echo "</td><center><td id='tableMain'><center>"; echo " ".$row['ad_name']; echo "</td><center><td id='tableMain'><center>"; echo " ".$row['account_number']; echo "</td><center><td id='tableMain'><center>"; echo "<a href='../".$row['jpg_path']."".$row['file_name']."_".$row['page_number'].".jpg' class='lightwindow page-options' title='".$row['ad_name']."' author='".$row['book_center']." Composing'><img src='../images/site-icons/16x16/actions/viewmag.png'></a> <a href='../".$row['pdf_path']."".$row['file_name']."_".$row['page_number'].".pdf'><img src='../images/site-icons/16x16/actions/fileexport.png'></a> <a href='../includes/forms/emailTearsheet.php?Pid=".$row['thumb_path']."".$row['file_name']."_".$row['page_number'].".jpg&Did=".$row['pdf_path']."".$row['file_name']."_".$row['page_number'].".pdf&io=".$row['io_barcode']."' params='lightwindow_width=260,lightwindow_height=330' class='lightwindow page-options'><img src='../images/site-icons/16x16/actions/mail_generic.png'></a>" ; echo "</td><center><td id='tableMain'><center>"; echo " ".$row['clock']; echo "</td><center></tr>"; } echo "</table><br /><div align='right' class='style1'>your search returned <b>".$county."</b> records</div>"; echo "<br /><div align='right' class='style1'><img src='../images/site-icons/64x64/apps/xmag.png'>preview <img src='../images/site-icons/64x64/apps/kfloppy.png'>download <img src='../images/site-icons/64x64/apps/evolution.png'>email</div>"; mysql_close($mysql_link); ?> the above code searches a mysqlDB and and returns results to a table. It works PERFECT in mozilla but fails in IE. Link to comment https://forums.phpfreaks.com/topic/93588-ie-hangs-mozilla-and-safari-work-perfect-why-with-code/ Share on other sites More sharing options...
Isityou Posted February 28, 2008 Share Posted February 28, 2008 Keep in my mind SQL has nothing to do with the browser since processed on the server. Link to comment https://forums.phpfreaks.com/topic/93588-ie-hangs-mozilla-and-safari-work-perfect-why-with-code/#findComment-479595 Share on other sites More sharing options...
2tonejoe Posted February 29, 2008 Author Share Posted February 29, 2008 : bump : Link to comment https://forums.phpfreaks.com/topic/93588-ie-hangs-mozilla-and-safari-work-perfect-why-with-code/#findComment-480496 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.