Hi

I have the following tables:
CREATE TABLE `livres`(
 `id` int(10) unsigned NOT NULL auto_increment,
 `isbn` varchar(12) NOT NULL default '',
 'titre' varchar(80) NOT NULL default '',
 `auteur` int(10) unsigned NOT NULL default '0',
  `categorie` varchar(60) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `auteur` (`auteur`)
  )
  TYPE=MyISAM


CREATE TABLE `auteurs` (
`id` int(10) unsigned NOT NULL auto_increment,
`nom` varchar(80) NOT NULL default '',
`prenom` varchar(60) NOT NULL default '',
PRIMARY KEY  (`id`)
)
 TYPE=MyISAM

I want to produce a list of all livres by categorie ordered by titre
including the auteur'name

ex:   livre.categorie, livre.titre, livre.isbn, concat(auteurs.nom, ", ",
auteurs.prenom)

I used the following request:
select all livres.*, auteurs.id as auid, concat(auteurs.nom,', ',
auteurs.prenom) as nomauteur from livres, auteurs where auteurs.id =
livres.auteur group by livres.categorie order by livres.titre asc;

It returns only 1 line instead of all the lines in livres .

Why?



Thanks





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to