List:General Discussion« Previous MessageNext Message »
From:Michal Ludvig Date:March 20 1999 7:03pm
Subject:Re: Help with query, plz
View as plain text  
On Sat, 20 Mar 1999, Ed Carp wrote:
> 
> SELECT ip INTO temp_table
> FROM table
> GROUP BY ip
> HAVING (((Count(ip))<>1));
> 
> SELECT Count(*) FROM temp_table;

Hmm, my version of MySQL (3.22.19a) seems to support only 
"SELECT ip INTO OUTFILE xxx ...". What a pitty! Has it changed in 3.22.20?

Well, it seems there is no other solution but "SELECT DISTINCT ip FROM
table" and count the number of rows. I'm using Perl's DBI/DBD and there is
no mysql_num_rows() [I think]. So how to do it? 
I hope not via a cycle  "$i=0; while ($sth->fetchrow()) {$i++;}" ...

Michal Ludvig

Thread
Help with query, plzMichal Ludvig20 Mar
  • Re: Help with query, plzThimble Smith20 Mar
    • Re: Help with query, plzMichal Ludvig20 Mar
    • Re: Help with query, plzMartin Ramsch20 Mar
Re: Help with query, plzEd Carp20 Mar
  • Re: Help with query, plzMichal Ludvig20 Mar
    • Re: Help with query, plzThimble Smith20 Mar
Re: Help with query, plzEd Carp20 Mar
  • Re: Help with query, plzMartin Ramsch20 Mar
Re: Help with query, plzEd Carp20 Mar