Jump to content

Archived

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

RDKL PerFecT

(Simple) SQL Error

Recommended Posts

[code]$sql = mysql_query("SELECT * FROM Links ORDER BY id asc WHERE ok='1' LIMIT $from, $max_results");
$offset = ($page-1)*$max_results;
$start = 1;

while($row = mysql_fetch_array($sql)){
//    $n = $i++ +1;        //add 1 so that numbers don't start with 0
    $n = $offset + $start;
    $start++;
    
    //RESULTS
    echo "<tr>\n";
        echo "<td>$n.</td>\n";
        echo "<td><a href='govisit.php?id=".$row["id"]."' target='_blank'>".$row["linkname"]."</a></td>\n";
        echo "<br><td>".$row["description"]."</td>\n";
        echo "<td><b><a href=\"$url\" target=\"_blank\">".$row["linkname"]."</a> has received ".$row["hits"]." hits from the RDKL LinkBase</b></td>
        </tr>\n";
        echo "<tr><td colspan='4'><hr></td></tr>\n";
  }
[/code]

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/site/links/rdk.links2.php on line 134

Is my error, any help is appreciated

Share this post


Link to post
Share on other sites
[code]
$sql = mysql_query("SELECT * FROM Links WHERE ok='1' ORDER BY id asc LIMIT $from, $max_results") or die(mysql_error());
[/code]

Share this post


Link to post
Share on other sites

×

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.