Jump to content

distinct


[LPGA]volumes
 Share

Recommended Posts

hey,

preciso aki duma ajudita... é o seguinte eu tenho uma tabela com faço o distinct ao ID, mas no entanto queria tambem mostrar outro campo (data) desse ID é possivel ? eu tou farto de tentar mas nao consigo.. :\

$query=mysql_query("SELECT distinct id FROM $sqldb_teste where ncliente = '" . $nomedogajo . "'") or die ("Não Selecionou a base de dados!");

ele assim mostra-me apenas qql do genero:

ID DATA

e na tabela tenho:

ID DATA
1 01/01/06
1 01/01/06
2 02/02/06
2 02/02/06
3 03/03/06
3 03/03/06
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. 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.