Timeline for MySQL query to find country and state of active users
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 13, 2014 at 12:47 | vote | accept | Brett | ||
Sep 13, 2014 at 12:47 | comment | added | Brett |
Thank you. As for your concern about the COALESCE , the code is correct. I inherited a system where countries AND states are all stored in the same table and only the more common countries have entries state entries in said table; so sometimes we have a connection in the countries table for the state (via a matching id in the users table) and hence the matched entry will be used, but if there is no match (user entered state) then it will skip that value as it will be NULL and it will use whatever state the user entered. :)
|
|
Sep 13, 2014 at 11:48 | history | answered | 200_success | CC BY-SA 3.0 |