Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Lionsanime Directory   World's Leading Outsourcing Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 07-27-2006, 12:06 PM   #1 (permalink)
Inactive
 
GoWFB_SEO's Avatar
 
Join Date: 06-01-06
Posts: 70
iTrader: 0 / 0%
Latest Blog:
None

GoWFB_SEO is liked by many
Send a message via MSN to GoWFB_SEO
Duplicated results, please help

http://www.topfurniturestores.com/index.php?c=6

Please take a look and you will see the problems, the results appeared twice.
the following is the php code i used:

PHP Code:
switch (TRUE){
//If the score is between 1 and 2, show one star
 
case ($score<1):
   if (
$row['featured'] =='Y'){echo
   
"<a href='".$row['url']."'>" .$row[title]. "</a><a class=moredetail href='moreinfo.php?siteid=".$row['id']."'>(More Detail)</a>";
   }else{
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a>";
        }
   break;
   case (
$score>=AND $score<2):
   if (
$row['featured'] =='Y'){echo
   
"<a href='".$row['url']."'>" .$row[title]. "</a><a class=moredetail href='moreinfo.php?siteid=".$row['id']."'>(More Detail)</a><img src=images/raing-image/star.png>";
   }else{
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a><img src=images/raing-image/star.png>";
        }
   break;
//If the score is between 2 and 3, show two star
  
case ($score>=AND $score <3):
   if (
$row['featured'] =='Y'){
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a><a class=moredetail href='moreinfo.php?siteid=".$row['id']."'>(More Detail)</a><img src=images/raing-image/star.png><img src=images/raing-image/star.png>";
   }else{
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a><img src=images/raing-image/star.png><img src=images/raing-image/star.png>";
        }
   break;
   
//If the score is between 3 and 4, show three star
case ($score>=AND $score<4):
   if (
$row['featured'] =='Y'){
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a><a class=moredetail href='moreinfo.php?siteid=".$row['id']."'>(More Detail)</a><img src=images/raing-image/star.png><img src=images/raing-image/star.png><img src=images/raing-image/star.png>";
   }else{
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a><img src=images/raing-image/star.png><img src=images/raing-image/star.png><img src=images/raing-image/star.png>";
        }
   break;
   
//If the score is between 4 and 5, show four star
case ($score>=AND $score<5):
   if (
$row['featured'] =='Y'){
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a><a class=moredetail href='moreinfo.php?siteid=".$row['id']."'>(More Detail)</a><img src=images/raing-image/star-red1.png><img src=images/raing-image/star-red1.png><img src=images/raing-image/star-red1.png><img src=images/raing-image/star-red1.png>";
   }else{
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a><img src=images/raing-image/star-red1.png><img src=images/raing-image/star-red1.png><img src=images/raing-image/star-red1.png><img src=images/raing-image/star-red1.png>";
        }
   break;
//If the score is 5, then show 5 stars
   
case $score==5:
   if (
$row['featured'] =='Y'){
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a><a class=moredetail href='moreinfo.php?siteid=".$row['id']."'>(More Detail)</a><img src=images/raing-image/star-red.png><img src=images/raing-image/star-red.png><img src=images/raing-image/star-red.png><img src=images/raing-image/star-red.png><img src=images/raing-image/star-red.png>";
   }else{
   echo 
"<a href='".$row['url']."'>" .$row[title]. "</a><img src=images/raing-image/star-red.png><img src=images/raing-image/star-red.png><img src=images/raing-image/star-red.png><img src=images/raing-image/star-red.png><img src=images/raing-image/star-red.png>";
        }
   break;

GoWFB_SEO is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 07-27-2006, 12:23 PM   #2 (permalink)
Inactive
 
littleFella's Avatar
 
Join Date: 06-20-04
Location: Ontario
Posts: 3,359
iTrader: 0 / 0%
Latest Blog:
None

littleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to behold
What's the SQL statement?
littleFella is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-27-2006, 12:29 PM   #3 (permalink)
Inactive
 
GoWFB_SEO's Avatar
 
Join Date: 06-01-06
Posts: 70
iTrader: 0 / 0%
Latest Blog:
None

GoWFB_SEO is liked by many
Send a message via MSN to GoWFB_SEO
PHP Code:
$sql"SELECT * FROM $table_name WHERE accepted='y' ORDER BY....";
$results=mysql_query($sql);
While(
$row=mysql_fetch_array($results)) 
...... 
it is just normal statement, i don't think the problem lay in here
GoWFB_SEO is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-29-2006, 07:48 AM   #4 (permalink)
Inactive
 
littleFella's Avatar
 
Join Date: 06-20-04
Location: Ontario
Posts: 3,359
iTrader: 0 / 0%
Latest Blog:
None

littleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to behold
I can't see any reasons for the duplications.
I imagine this code is in some sort of a loop. Did you check the loop's logic?
littleFella is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-29-2006, 08:11 AM   #5 (permalink)
Inactive
 
GoWFB_SEO's Avatar
 
Join Date: 06-01-06
Posts: 70
iTrader: 0 / 0%
Latest Blog:
None

GoWFB_SEO is liked by many
Send a message via MSN to GoWFB_SEO
Quote:
Originally Posted by littleFella
I can't see any reasons for the duplications.
I imagine this code is in some sort of a loop. Did you check the loop's logic?
ya, that's why i am so confused why it got duplicaed content, i will look more into that
GoWFB_SEO is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-30-2006, 11:34 AM   #6 (permalink)
Inactive
 
ali_420's Avatar
 
Join Date: 06-16-06
Posts: 268
iTrader: 0 / 0%
Latest Blog:
None

ali_420 is on the right pathali_420 is on the right pathali_420 is on the right path
I thiiink the file is being included twice.
ali_420 is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-31-2006, 10:22 AM   #7 (permalink)
Inactive
 
GoWFB_SEO's Avatar
 
Join Date: 06-01-06
Posts: 70
iTrader: 0 / 0%
Latest Blog:
None

GoWFB_SEO is liked by many
Send a message via MSN to GoWFB_SEO
Quote:
Originally Posted by ali_420
I thiiink the file is being included twice.
i checked, the file is only included once, i will double check to make sure


i hate php and mysql
GoWFB_SEO is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-31-2006, 10:41 AM   #8 (permalink)
Contributing Member
 
Optix's Avatar
 
Join Date: 07-24-06
Location: UK
Posts: 149
iTrader: 0 / 0%
Latest Blog:
None

Optix is liked by many
Send a message via AIM to Optix Send a message via MSN to Optix
You know you Luurrrrve it realy!!

.~Optix~.
Optix is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

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
Know how content gets duplicated webcosmo SEO Forum 4 03-13-2008 09:42 AM
Duplicated Content Website ashisharora_83 SEO Forum 3 06-29-2007 10:03 AM
Survey results: What regular people think about Google results. sniperhiga Google Forum 1 03-09-2007 08:43 PM
Is this duplicated content? redstarweb Google Forum 5 10-02-2004 07:06 PM
Different listed results to total results...continued PhilC Google Forum 2 10-17-2003 12:13 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 11:33 AM.
© Copyright 2008 V7 Inc