Jump to content


Photo

One Result Per Series? Please HELP


  • Please log in to reply
2 replies to this topic

#1 Cloud9247

Cloud9247
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationMy Computer

Posted 12 August 2006 - 06:08 PM

currrently I am retrieving data from a database named 'graphics', I want it to list all the series in ther database, but I don't want it to repeat the same series twice. How do I make it so a series' name doesn't show more than once?

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 12 August 2006 - 06:18 PM

use SELECT DISTINCT series as part of your query
Legend has it that reading the manual never killed anyone.
My site

#3 Cloud9247

Cloud9247
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationMy Computer

Posted 14 August 2006 - 11:18 PM

I u7sed that, but it still is repeating the same series twice, why? this is my query:

 $sqll= "SELECT DISTINCT id, active, series FROM graphics WHERE active='1' ORDER BY `series` ASC";
$rss= mysql_query( $sqll, $connection );
while($row= mysql_fetch_array( $rss )) {





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users