Unregistered Avatar

Reply

A little problem...


 
LinkBack Thread Tools Display Modes

  #1 (permalink)  

Old 02-18-2005, 10:33 PM

A little problem...

If you go to http://www.melodeath.com , you will notice that the articles part of the stats displays absolutely nothing Here is the original code that I had, which for some godforsaken reason it didn't work:

PHP Code:
<div class="nav">MeloDeath Statistics</div>
  <hr />
    <?
    
//define sql query and execute, gets the lyrics id...
        
$query mysql_query("SELECT * FROM lyrics ORDER BY id DESC LIMIT 1");
        
//loop through each array of data as $result
            
while($results mysql_fetch_array($query))
            {
            
?>
            Lyrics:  <? echo $results["id"?>
            <?
            
}
            
?>
            <?
    
//define sql query and execute, gets the article ID ...
        
$query1 mysql_query("SELECT * FROM articles ORDER BY id DESC LIMIT 1");
        
//loop through each array of data as $result
            
while($results1 mysql_fetch_array($query1))
            {
            
?>
            <br />Articles: <? echo $reslults1["id"?>
            <?
            
}
            
?>
            
  </div>
So yes, for some reason that didn't want to work for me at all. Oh well. Sicloan told me it would be easier to put some of that code into a seperate file and just include it in there, but if you go to http://www.melodeath.com/test you can see my dilema. This is what I changed that file to:

PHP Code:
<?php
require_once('functions/mysql_connect-lyrics.php');
include(
'funcitons/lyricstats.php');
include(
'functions/articlestats.php');
?>
<div id="left">
  <div class="nav">
   Navigation<br />
   </div><hr />
  <a href="http://www.melodeath.com/index.php">Home </a><br />
    <a href="http://www.melodeath.com/forums/index.php">Forums</a><br />
    <a href="http://www.melodeath.com/lyrics/index.php">Lyrics</a><br />
    <a href="http://www.melodeath.com/articles/index.php">Articles</a><br />
    <a href="http://www.melodeath.com/contact.php">Contact</a><br />
  <a href="http://www.melodeath.com/disclaimer.php">Disclaimer</a> 
  <div class="nav"> </div>
  <hr />
  <div class="nav">MeloDeath Statistics</div>
  <hr />
    Lyrics: <? echo $lyricstats["id"?><br />
    Articles: <? echo $articlestats["id"?>
            
  </div>
And then my included functions look like:

PHP Code:
<?
require_once('mysql_connect-lyrics.php');
    
//define sql query and execute, gets the article ID ...
        
$query mysql_query("SELECT * FROM articles ORDER BY id DESC LIMIT 1");
        
//loop through each array of data as $result
            
while($articlestats mysql_fetch_array($query))
                        
?>
The other function looks pretty similiar, only changed in certain places. Am I completely missing the point of functions?
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #2 (permalink)  

Old 02-19-2005, 09:25 AM

Wow jd, i thought you would have caught this one... minor spelling error.
PHP Code:
<br />Articles: <? echo $reslults1["id"?>
$reslults1??????

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,784

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #3 (permalink)  

Old 02-19-2005, 10:29 AM

Yeah I was just gonna say that...Even so, you should run some kind of spell check;

"include('funcitons/lyricstats.php'); "

If that is intended is beyond me...but Id guess not.

borednerd is offline registered.

borednerd's Avatar

Join Date: Feb 2005

Posts: 31

  #4 (permalink)  

Old 02-19-2005, 01:33 PM

Jesus...someone slap me...really hard.

http://www.melodeath.com

I didn't even have to create a seperate function...I'm just nub and ghey. Thanks guys, I have been overlooking that for the past 2 weeks
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again

Last edited by jd-inflames : 02-19-2005 at 01:37 PM.

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #5 (permalink)  

Old 02-19-2005, 01:46 PM

no problem man. I guess i should have spotted that earlier, but you didnt show me damn...

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,784

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #6 (permalink)  

Old 03-01-2005, 07:34 PM

sometimes I can't tell if I made a typo or not, but I like to rewrite to code over completely and not copy paste part of it to make it into a seperate function etc

quentin is offline registered.

Join Date: Mar 2005

Posts: 1

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Utah Fixes Problem For Sweaty Balls FuLouZero The VOID! 4 03-19-2005 06:43 PM
Speaking of Connection Problems... FuLouZero Discussion Lounge 4 03-08-2005 06:50 PM
i have a problem .ProphetUnknown 3D Art and Animation 3 02-26-2005 04:44 PM
Avatar Problem Fixed missionsix Discussion Lounge 2 06-27-2004 03:43 PM
avatar problem Death_Noodle Site Support and Suggestions 5 06-26-2004 03:23 PM


All times are GMT -7. The time now is 09:30 PM.