Jump to content

Php pagination What am i doing.


Deanznet

Recommended Posts

Hey everytime, i use a tutorial for it, i get an error such as mysql_fetch_array not a valid resource, Not sure why! heres my code.

 

<?php include("header.php"); ?>
<div class="results"><h2>Latest <a href="/movies">Anime</a> torrents</h2>
<?php
require_once 'config.php';


$result = mysql_query("SELECT * FROM rssfeed where categories='Movies'");

//grab all the content
while($r=mysql_fetch_array($result))
{	
   //the format is $variable = $r["nameofmysqlcolumn"];
   //modify these to match your mysql table columns
  
   $title=$r['title'];
   $pubDate=$r['pubDate'];
   $categories=$r['categories'];
   $url=$r['url'];
   
   //display the row
   echo "<dl><dt style='background: transparent url('/img/accept.png') no-repeat right center' title='Verified Source'><a href='$url'>$title</a>&#187;$categories&#187;$pubDate</dt></dd></dl> ";
}
?></div>

Link to comment
https://forums.phpfreaks.com/topic/123741-php-pagination-what-am-i-doing/
Share on other sites

Usually means there is an error with your Query. To find the error change your query line to this:

 

$result = mysql_query("SELECT * FROM rssfeed where categories='Movies'") or die(mysql_error());

 

That should give you the information you need about how to fix the error.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.