You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 376 guest(s) and 16 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Code From PHP-Nuke HOWTO [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
adaykin
Nuke Cadet
Nuke Cadet


Joined: Aug 16, 2007
Posts: 9


PostPosted: Wed Dec 26, 2007 8:12 am Reply with quoteBack to top

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?
Find all posts by adaykinView user's profileSend private messageVisit poster's website
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Thu Dec 27, 2007 6:02 am Reply with quoteBack to top

Try

Code:

$result = sql_query("select count from " . $prefix . "_counter order by type desc limit 0.1", $dbi);

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
adaykin
Nuke Cadet
Nuke Cadet


Joined: Aug 16, 2007
Posts: 9


PostPosted: Sun Dec 30, 2007 6:43 pm Reply with quoteBack to top

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]
Find all posts by adaykinView user's profileSend private messageVisit poster's website
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Sun Dec 30, 2007 11:24 pm Reply with quoteBack to top

Not sure what this code is supposed to do exactly, but since $content is not populated anywhere else, you should just use
Code:

$content = $count;

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
adaykin
Nuke Cadet
Nuke Cadet


Joined: Aug 16, 2007
Posts: 9


PostPosted: Mon Dec 31, 2007 9:40 am Reply with quoteBack to top

So who made the how to? Should the info in the how to be changed?
Find all posts by adaykinView user's profileSend private messageVisit poster's website
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Mon Dec 31, 2007 11:09 am Reply with quoteBack to top

I didn't make it. Chris did.


The HOWTO has a lot of old code. I'm just going to make a new Nuke guide from scratch Smile

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
adaykin
Nuke Cadet
Nuke Cadet


Joined: Aug 16, 2007
Posts: 9


PostPosted: Tue Jan 01, 2008 4:11 am Reply with quoteBack to top

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 Cool
Find all posts by adaykinView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.085 Seconds - 284 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::