Jump to content

[SOLVED] Query "one from all"


web_master

Recommended Posts

hi,

 

I got a table and one column is column of the years. Well there is lots of different years in rows but there is a lots of same years.

 

My question is, how can I list years but if in table more than one of the same "year" list only one time.

 

Exaple:

 

in table is:

2008

2008

2008

1976

2007

 

Listed:

2008

2007

1976

 

 

<?php 
$query_return = mysql_query("SELECT `years` FROM `text` ORDER BY `id`");

while($request = mysql_fetch_array($query_return)) {

//

}
?>

 

thanxs in advanced,

 

T

Link to comment
https://forums.phpfreaks.com/topic/161789-solved-query-one-from-all/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.