| Author |
Message |
adaykin
Nuke Cadet


Joined: Aug 16, 2007
Posts: 9
|
Posted:
Wed Dec 26, 2007 8:12 am |
  |
Hello Code from the Nuke HOWTO from section 20.2.2 says
[php]
<?php
if (eregi("block-hits,php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
global $prefix, $dbi;
$result = sql_query("select count from "$prefix."_counter
order by type desc limit 0.1", $dbi);
list($count) = sql_fetch_row($result, $dbi);
$content. = $count
?>
[/php]
But when I put the code into PHPEclipse I get an error around the first occurence of $result. I think it is because there is double quotes within double quotes. I haven't been able to try it yet since my web host is down, but can someone tell me if this is an error, or if eclipse is mistaking it for an error? |
|
|
    |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12383
|
Posted:
Thu Dec 27, 2007 6:02 am |
  |
|
     |
 |
adaykin
Nuke Cadet


Joined: Aug 16, 2007
Posts: 9
|
Posted:
Sun Dec 30, 2007 6:43 pm |
  |
I added that and now I get an error on the last line $content. = $count; here is what I have. It seems it wants me to put == instead of =
[php]
if (eregi("ContactMe.php", $PHP_SELF)) {
Header("Location: index.php");
die();
global $prefix, $dbi;
$result = sql_query("select count from " . $prefix . "_counter order by type desc limit 0.1", $dbi);
list($count) = sql_fetch_row($result, $dbi);
$content. = $count;
}
[/php] |
|
|
    |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12383
|
Posted:
Sun Dec 30, 2007 11:24 pm |
  |
|
     |
 |
adaykin
Nuke Cadet


Joined: Aug 16, 2007
Posts: 9
|
Posted:
Mon Dec 31, 2007 9:40 am |
  |
So who made the how to? Should the info in the how to be changed? |
|
|
    |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12383
|
Posted:
Mon Dec 31, 2007 11:09 am |
  |
|
     |
 |
adaykin
Nuke Cadet


Joined: Aug 16, 2007
Posts: 9
|
Posted:
Tue Jan 01, 2008 4:11 am |
  |
| Quote: |
| The HOWTO has a lot of old code. I'm just going to make a new Nuke guide from scratch |
Awesome, I'll be looking forward to it  |
|
|
    |
 |
|
|