List:General Discussion« Previous MessageNext Message »
From:Roberto Zárate Mendoza Date:July 22 2010 6:35am
Subject:Re: MySQL select matching
View as plain text  
hello ashley@stripped;
where is the solution:
You have table A, so copy the entire table in another table. Table B.
so Table A=Table B (only in data no constrains)
then [id]=id you want to search

Untitled

select B.cod,count(*) entrysA from A,B where
A.atrib1=B.atrib1 and
A.atrib2=B.atrib2 and
A.cod<>B.cod and
A.cod= [id]
group by B.cod
having entrysA=(select count(*) from A where cod= [id])

The first colum are your id´s solutions and the second colums the amount of
rows per Id.
I hope I help....nice problem... I did it with a friend...
cya man


Roberto Zárate Mendoza
Student of systems engineering
Facultad de Ingenieria Industrial y Sistemas
Universidad Nacional de Ingenieria - Lima, Peru

Thread
MySQL select matchingAshley M. Kirchner19 Jul
  • Re: MySQL select matchingMichael Dykman19 Jul
    • Re: [MySQL] Re: MySQL select matchingAshley M. Kirchner19 Jul
    • Re: MySQL select matchingRoberto Zárate Mendoza22 Jul
  • Re: MySQL select matchingMySQL)19 Jul
    • Re: [MySQL] Re: MySQL select matchingAshley M. Kirchner19 Jul
      • Re: [MySQL] Re: MySQL select matchingPeter Brawley19 Jul
  • Re: [PHP] MySQL select matchingSimcha Younger21 Jul