PHP Nuke Nederland
 
•   Home  •  Downloads  •  Your Account  •  Forums  •
PHP-Nuke Nederland: Forums

PHP-Nuke Nederland :: View topic - block-Reviews
 Forum FAQ  •   Search   •  Memberlist  •  Usergroups   •  Register   •    •  Profile  •  Log in to check your private messages  •  Log in

 
Post new topicReply to topic
View previous topic Log in to check your private messages View next topic
Author Message
kenwood
Moderator
Moderator


Joined: Sep 07, 2004
Posts: 246

PostPosted: Mon 07 Jul 2008 3:09 Reply with quoteBack to top

Op een site gebruk ik block-Reviews maar er wordt nog al eens een dubble review geplaatst.

Nu wilde ik eigenlijk de dubbele posten niet tonen in mijn block op de mianpage en alleen de eerste van elke review.
En de dubbel posten met de zelfde title dus over slaan.

[php]if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}

global $prefix, $db;

$content = '';
$sql = 'SELECT id, title FROM '.$prefix.'_reviews ORDER BY id DESC LIMIT 0,10';
$result = $db->sql_query($sql);
while (list($id, $title) = $db->sql_fetchrow($result)) {
$id = intval($id);
$content .= '<strong><big>·</big></strong> <a>'.$title.'</a><br>';
}
?>[/php]

Dit is de code die ik gebruik voor het block
View user's profileSend private message
zeromechanic
Administrator
Administrator


Joined: Oct 01, 2004
Posts: 1448
Location: Emmeloord

PostPosted: Mon 07 Jul 2008 6:29 Reply with quoteBack to top

ff gauw uit het hoofd.

bekijk op de mysql site by de select statement de optie "group by"

kan zijn dat dit voor jou een optie is.

_________________
Te Lezen: Forum Regels | Te Gebruiken
View user's profileSend private messageVisit poster's website
kenwood
Moderator
Moderator


Joined: Sep 07, 2004
Posts: 246

PostPosted: Tue 08 Jul 2008 5:35 Reply with quoteBack to top

zeromechanic wrote:
ff gauw uit het hoofd.

bekijk op de mysql site by de select statement de optie "group by"

kan zijn dat dit voor jou een optie is.


Helaas werkt dit niet daar ik dan een vaste variable moet opgeven en die is telkens anders.
View user's profileSend private message
BlueLion
Administrator
Administrator


Joined: Aug 21, 2004
Posts: 2831

PostPosted: Tue 08 Jul 2008 8:02 Reply with quoteBack to top

Hoe ziet de tabel eruit?


BL

_________________
Te Lezen: Forum Regels | Te Gebruiken: Forum Zoek Functie
Aanbevolen PHP-Nuke versie: PHP-Nuke 7.6pl3.1!
Aanbevolen Security AddOn: Nuke Sentinel™
View user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
 Donaties   Adverteren 
Wilt u het forum steunen, dan kunt u nu eenvoudig doneren met PayPal.
Post new topicReply to topic
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

Web site powered by PHP-Nuke

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2004-2008 by BlueLion.
SEO enhanced with the Sitemapper script
You can syndicate our news using the file backend.php or ultramode.txt
Powered by PHP Powered by MySQL Apache Webserver Valid robots.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Pagina rendering: 0.07 seconden


[Valid News RSS]

RSS Feeds:
[RSS 2.0 News Feed]
[RSS 2.0 Download Feed]
[RSS 2.0 Forum Feed]
[RSS 2.0 Link Feed]
:: fisubsilver shadow phpbb2 style by Daz :: PHP-Nuke theme by BlueLion ::