Deanznet Posted September 11, 2008 Share Posted September 11, 2008 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>»$categories»$pubDate</dt></dd></dl> "; } ?></div> Link to comment https://forums.phpfreaks.com/topic/123741-php-pagination-what-am-i-doing/ Share on other sites More sharing options...
JasonLewis Posted September 11, 2008 Share Posted September 11, 2008 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. Link to comment https://forums.phpfreaks.com/topic/123741-php-pagination-what-am-i-doing/#findComment-638942 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.