|
|
|
|
|
|
|
|
|
|
|
#1 | |
|
Certified Nice Person
|
Quote:
http://bluesome.net/post/2005/08/18/50/
__________________
Click here to purchase a bridge I'm selling. |
|
|
|
|
|
|
#2 | |
|
Oh no, I'm sweating like Roger Ebert
|
Quote:
|
|
|
|
|
|
|
#3 |
|
WHO IS FONZY!?! Don't they teach you anything at school?
Join Date: Mar 2007
Posts: 45
|
yep. did everything it said.. even installed the role manager, etc..
tried several times & nothing works.. not in a post nor as a page. I have tgp on root & blog in dir. Script is in root & trying to include tgp script in post thats on blog in dir as Code:
<?
include("../script.php");
$query = "SELECT COUNT(url) AS numrows FROM links";
$result = mysql_query($query) or die('Error, query failed');
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$numrows = $row['numrows'];
$maxPage = ceil($numrows/65);
$sql = "SELECT url, title, date FROM `links` ORDER BY date DESC LIMIT ".$offset.", 65;";
$rs = mysql_query($sql);
echo mysql_error();
$self = $_SERVER['PHP_SELF'];
$nav = '';
for($page = 1; $page <= $maxPage; $page++)
{
if ($page == $pageNum)
{
$nav .= " $page ";
}
else
{
$nav .= " <a href=\"$self?page=$page\">$page</a> ";
}
}
while($row = mysql_fetch_row($rs)){
echo "<a href=\"".$row[0]."\">".$row[1]."</a>".$row[2]."\n<br>\n";}
echo "<p>Page: ";
$self = $_SERVER['PHP_SELF'];
$nav = '';
for($page = 1; $page <= $maxPage; $page++)
{
if ($page == $pageNum)
{
$nav .= " $page ";
}
else
{
$nav .= " <a href=\"$self?page=$page\">$page</a> ";
}
}
echo $first . $prev . $nav . $next . $last;
mysql_close();
?>
Code:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ 65′ at line 1 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /dirname/0/blahblah/htdocs/file/name/wp-content/plugins/exec-php/runtime.php(41) : eval()’d code on line 29 |
|
|
|
|
|
#4 | |
|
Certified Nice Person
|
In the docs, the author states:
Quote:
![]() I'm not a PHP guru, so I really couldn't tell you what's wrong with the included script's code.
__________________
Click here to purchase a bridge I'm selling. |
|
|
|
|
|
|
#5 | |
|
WHO IS FONZY!?! Don't they teach you anything at school?
Join Date: Mar 2007
Posts: 45
|
Quote:
The code works fine on a normal php page. Must be some conflict with wordpress & the plugin and I don't know how to fix this as I didn't write this code |
|
|
|
|
|
|
#6 |
|
Oh no, I'm sweating like Roger Ebert
|
It's more than likely a pathing problem in the code. Wordpress is a bit unique in that a post resides within the theme and the path through there would be through your theme.
Try using absolute instead of relative paths and you may be ok. |
|
|
|
![]() |
|
|