Hi Brian, all!
brian wrote: > On 10-06-14 09:13 PM, brian wrote: >> [[...]] >> >> This not only gives an empty set, but also throws 171 warnings (more on >> that below). I've remove both the WHERE and GROUP BY clauses with no >> success. I've been staring at this for an hour now and can't see what >> the trouble is. Can any of you? > > Solved. I just noticed the quoting difference here: > > ON `Member`.`country_id` = 'Country.id' > > Country.id is entirely wrapped in single quotes rather than the alias > and column being separately wrapped with back-ticks. I've changed my > code so that the query is created properly. Quote inserted by Jörg: >> As for the warnings: >> >> Warning | 1292 | Truncated incorrect DOUBLE value: 'Country.id' > > I'm still curious about the strange warning, though. AIUI, the wrong quotes in your statement made the parser take Country.id as a string, which was then to be compared to an integer (the country_id column). This comparison forced a conversion from string to number, and the string contained a dot which was assumed to be a decimal point, hence a floating point number. If 171 is the number of rows in your countries table, then it is also the number of times this comparison is done. The warnings should be gone, I assume, now that you fixed the quoting. Jörg -- Joerg Bruehe, MySQL Build Team, joerg.bru...@sun.com Sun Microsystems GmbH, Komturstrasse 18a, D-12099 Berlin Geschaeftsfuehrer: Juergen Kunz Amtsgericht Muenchen: HRB161028 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org