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

2004-06-30 Thread Rui Cunha
Hi Torsten, until now,the best i could get was getting 6 random rows...still working on ensuring to retrive just 2 rows for category...meanwhile,you can solve the problem easily with a php loop trough the following query: select field_id , language , category from yourtable where language = '

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

2004-06-30 Thread Torsten Roehr
"Rui Cunha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Torsten, > > until now,the best i could get was getting 6 random rows...still working on > ensuring to retrive just 2 rows for category...meanwhile,you can solve the > problem easily with a php loop trough the following qu

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

2004-06-30 Thread franciccio
I suggest to first analize the problem and then go through the query, php coding ...etc etc In the table u have only one superkey which is also a key and it is made of the three fields (attributes) 'category', 'language' and ' name'. You should consider to look for a prymary key randomly, togheth