ktsirig Posted September 17, 2005 Share Posted September 17, 2005 Hi everybody. I have created a rather complex query for my database, which works OK (I mean it brings the right results). The problem is that the results are brought to me 4 times. That means that if the query has one correct answer, I get the answer, but I get it in 4 times. What can be the fault? I have written my code here, but I don't think it's easier, since it would be difficult to explain the structure of the database SELECT refU.code FROM reference AS refU LEFT JOIN protein_reference AS prU ON refU.reference_id = prU.reference_id LEFT JOIN protein_reference AS prQ ON prU.protein_id = prQ.protein_id LEFT JOIN reference as refQ ON refQ.reference_id = prQ.reference_id LEFT JOIN protein ON protein.protein_id = prU.protein_id LEFT JOIN datab ON datab.datab_id = refU.datab_id LEFT JOIN protein_organism ON protein_organism.protein_id = protein.protein_id LEFT JOIN organism ON organism.organism_id = protein_organism.organism_id LEFT JOIN families_reference ON families_reference.reference_id = refU.reference_id LEFT JOIN families ON families.families_id = protein.families_id WHERE protein.name like '%ahh3%' AND datab.name='prnd'; So, if the correct answer is the code QWE234 for instance, mysql returns: QWE234 QWE234 QWE234 QWE234 I understand that it might be difficult to give me an answer, but I was wondering if there is any mistake in my syntax and therefore I get the result 4 times. The syntax as it is is correct for the job I need it to do. Link to comment https://forums.phpfreaks.com/topic/2519-irritating-error/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.