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

Mauro Lorenzutti mauro.lorenzutti at webformat.com
Fri Oct 7 14:52:11 CEST 2011


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


-- 
Mauro Lorenzutti

CTO / Software Architect
mauro.lorenzutti at webformat.com
Tel.   +39-0427-926.389

WEBFORMAT srl – www.webformat.com
Via S. Francesco d'Assisi, 6 – 20122 MILANO
Corte Europa, 12 - 33097 SPILIMBERGO (PN)

TYPO3 Certified Integrator



More information about the TYPO3-english mailing list