////////// START ERROR ///////////////////////////////////////////////////////Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /mnt/w0401/d36/s19/b028727b/www/madtaco.com/junk/imgup/search.php on line 47////////// START CODE ////////////////////////////////////////////////////////<?phperror_reporting(63);include "imgtag.php";// build query$query = "SELECT * FROM $img_table WHERE ";// title$query .= "img_title LIKE '%".$HTTP_POST_VARS["title"]."%' AND ";// description$query .= "img_descr LIKE '%".$HTTP_POST_VARS["descr"]."%' AND ";// alt$query .= "img_alt LIKE '%".$HTTP_POST_VARS["alt"]."%' AND ";// widthif (trim($HTTP_POST_VARS["width"])!="") { $query .= "img_width".$HTTP_POST_VARS["width_expr"]. $HTTP_POST_VARS["width"]." AND ";}// heightif (trim($HTTP_POST_VARS["height"])!="") { $query .= "img_height".$HTTP_POST_VARS["height_expr"]. $HTTP_POST_VARS["height"]." AND ";}// bytesif (trim($HTTP_POST_VARS["bytes"])!="") { $query .= "img_bytes".$HTTP_POST_VARS["bytes_expr"]. $HTTP_POST_VARS["bytes"]." AND ";}// type$query .= "img_alt LIKE '%".$HTTP_POST_VARS["type"]."%' AND ";// finish the query (we ended every part with AND)$query .= "1";// execute the query$result = mysql_query($query);// get the number of results$num_rows = mysql_num_rows($result);// start the results table?><html><script language="javascript">/* source: www.vpro.nl */function bigImage(name) { if (navigator.appName=="Netscape") { var imagewindow = window.open('bigimage.php?f='+name,'imagewindow'+name, 'resizable=yes,scrollbars=no,status=1,innerWidth=450,innerHeight=402'); } else { var imagewindow = window.open('bigimage.php?f='+name,'imagewindow'+name, 'resizable=yes,scrollbars=yes,status=1,width=450,height=402'); }}</script><body><h1>Search Results</h1><table><?php// one row for each resultfor ($i=0; $i<$num_rows; $i++) { // fetch row $img_info = mysql_fetch_array($result); // start table row echo '<tr><td><a href="bigimage.php?f='.$img_info["img_file"].'" '. 'target="_new" onclick="bigImage('."'".$img_info["img_file"]."')". '; return false;">'; // generate the image tag echo img_tag($img_info["img_file"], array("x"=>"250")); // echo image information echo "</a></td><td><b>".$img_info["img_title"]."</b><br>". $img_info["img_descr"]."<hr><b>Alt:</b> ".$img_info["img_alt"]. "<br><b>Pixels:</b> ".$img_info["img_width"]."x". $img_info["img_height"]."<br><b>Bytes:</b> ". $img_info["img_bytes"]."<br><b>Type:</b> ". $img_info["img_type"]."</td></tr>\n";}?></table></body></html>