Re: Re[2]: [PHP-DB] MySQL: Random select with specific count of a column

2004-07-06 Thread Torsten Roehr
"Pablo M. Rivas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Torsten, > > > TR> thanks for your help. Unfortunately it's always returning the same row for > TR> each category (maybe because of the group by) and only one row for each > TR> category. I need to select 2 random

Re[2]: [PHP-DB] MySQL: Random select with specific count of a column

2004-07-05 Thread Pablo M. Rivas
Hello Torsten, TR> thanks for your help. Unfortunately it's always returning the same row for TR> each category (maybe because of the group by) and only one row for each TR> category. I need to select 2 random rows for each category. Any more ideas? I'ts returning 2 rows each RECORD, but the fie

Re: [PHP-DB] MySQL: Random select with specific count of a column

2004-06-29 Thread Torsten Roehr
"Pablo M. Rivas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Torsten, > > This is one, but I think you can find another one: > Supose your table is called tablename > > select * from tablename as a left join tablename as b on > a.category = b.category and

Re: [PHP-DB] MySQL: Random select with specific count of a column

2004-06-29 Thread Pablo M. Rivas
Hello Torsten, This is one, but I think you can find another one: Supose your table is called tablename select * from tablename as a left join tablename as b on a.category = b.category and a.name<>b.name and a.language=b.language where a.language='de' and b.name is n

[PHP-DB] MySQL: Random select with specific count of a column

2004-06-29 Thread Torsten Roehr
Hi, I've got the following table: categorylanguagename 1 de a 1 de b 1 de c 2 de a 2 de b 2 de c 3 de a 3 de b 3 de c