RDKL PerFecT Posted May 17, 2006 Share Posted May 17, 2006 [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 134Is my error, any help is appreciated Link to comment https://forums.phpfreaks.com/topic/9854-simple-sql-error/ Share on other sites More sharing options...
alpine Posted May 17, 2006 Share Posted May 17, 2006 [code] $sql = mysql_query("SELECT * FROM Links WHERE ok='1' ORDER BY id asc LIMIT $from, $max_results") or die(mysql_error());[/code] Link to comment https://forums.phpfreaks.com/topic/9854-simple-sql-error/#findComment-36595 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.