| List: | General Discussion | « Previous MessageNext Message » | |
| From: | bert hubert | Date: | March 13 1999 1:40pm |
| Subject: | Re: Select Count(Distinct <fieldname>) from <table>... | ||
| View as plain text | |||
On Sat, 13 Mar 1999, Hank Eskin wrote: > The only solution I have used to do this is issue: > SELECT <fieldname>, count(*) from <tablename> GROUP BY > <fieldname>; > and then get the mysql_NUMROWS (using PHP3). > > So, is there a way, in one simple query to return this value? Not yet. I've offered Monty to code it in, but he requested that I wait for improvements in MySQL making the implementation easier. A Quick Hack might be possible though. But all it would do is implement the mysql_numrows trick, discarding the table generated. regards, bert hubert.
| Thread | ||
|---|---|---|
| • Select Count(Distinct <fieldname>) from <table>... | Hank Eskin | 13 Mar |
| • Re: Select Count(Distinct <fieldname>) from <table>... | bert hubert | 13 Mar |
| • Re: MySQL 4.0.11 is released | Ken Menzel | 26 Feb |
| • Re: MySQL 4.0.11 is released | Mark Matthews | 26 Feb |
| • Re: MySQL 4.0.11 is released | Lenz Grimmer | 26 Feb |
| • RE: MySQL 4.0.11 is released | Duncan Salada | 26 Feb |
| • Re: MySQL 4.0.11 is released | Mark Matthews | 26 Feb |
| • RE: MySQL 4.0.11 is released | Lenz Grimmer | 26 Feb |
| • Re: MySQL 4.0.11 is released | Benjamin Pflugmann | 26 Feb |
| • Re: MySQL 4.0.11 is released | Lenz Grimmer | 28 Feb |
