error mysql_num_rows()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
i made i search script and in localhost it works ok.
But when i 'll publish the script in the web i see that error msg
 
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/expressfilm.gr/www/demo/results.php on line 51
 
Here is the code of the scripot is (from result.php) 
 
$sindesi=mysql_pconnect("localhost","servers_username","serbers_pass")or die ("no connect");

$basi=mysql_select_db("film") or die("de sindeete");
 
$query="
SELECT `sel` , `body` 
FROM `film`.`main` 
WHERE `sel` 
REGEXP '$key' OR `body` 
REGEXP '$key' LIMIT 0 , 30 

";

$result = mysql_query($query);

  $num = mysql_num_rows($result);
  for ($i=0; $i <$num; $i++)
  {
     $row = mysql_fetch_array($result);
     echo "<p><strong>";
     echo $row["key"];
     echo "</strong><br> ";
  echo' <br>  ';
  $sel =$row["sel"];
  
  echo "<a href = \"index.php?sel=".$sel."\">Περισσότερα</A>";
     echo "</p>";
  }




---------------------------------
Do You Yahoo!?
Αποκτήστε την δωρεάν σας@yahoo.gr διεύθυνση  στο Yahoo! Mail.

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux