[TYPO3-english] WFQBE: getting double results when joining tables

Moritz Masurek mail at mm80.de
Fri Oct 7 20:41:43 CEST 2011


You´re absolutely correct Mauro, i was joining the tables on the wrong 
fields. Silly me...

Thank you so much!

Mo

Am 07.10.2011 14:52, schrieb Mauro Lorenzutti:
> Hi Moritz,
>
> it happens when you join two tables and you show some fields only.
>
> For example:
>
> TABLE A
> id, field1, field2
> 1, alfa romeo, italy
> 2, volkswagen, germany
> 3, ferrari, italy
>
> TABLE B
> id, foreignid, field1, field2
> 1, 1, giulietta, black
> 2, 1, giulietta, red
> 3, 2, golf, white
> 4, 2, golf, black
>
> If your query is the following one:
> SELECT A.field1 AS brand, B. field1 AS car FROM A JOIN B ON 
> B.foreignid=A.id
>
> the result will looks like this:
> alfa romeo, giulietta
> alfa romeo, giulietta
> volkswagen, golf
> volkswagen, golf
>
> (I hope I was not wrong... :-))
>
> Bye,
> Mauro
>
>
> Il 07/10/2011 02:40, Moritz Masurek ha scritto:
>> Hey everybody,
>>
>> maybe this is a beginners question - i don`t know that much about Mysql
>> selects in general so i can't tell if this is a problem that could also
>> occur when not using wfqbe. I am joining two tables and i am getting
>> results, but some of them - not all, which seems particularly strange -
>> are displayed twice.
>>
>> Here is a screenshot of the whole query:
>> http://dl.dropbox.com/u/26770048/wfqbe.png
>>
>> Can anybody help?
>>
>> Thank you
>>
>> Mo
>
>



More information about the TYPO3-english mailing list