Technology Tools for Ministry

Community

Web-Empowered Church User Community
All Categories > Ministry Tools > Map Extension > DB Table Map with tt_address and different address groups?
Total Posts: 13 - Pages (2): [1] 2
Author: Frank Struck
Posted: Apr 28 2008 - 09:33 AM
Subject: DB Table Map with tt_address and different address groups?
Hello,

does anyone use the plugin 'DB Table Map' with 'tt_address' and different address groups with different icons?

I wonder how to manage the database join and the query to select the records to be shown because the group assignment is not in 'tt_address', but in 'tt_address_group_mm'.

Any help is appreciated. Thanks in advance.

Frank
user picture Author: Christoph Koehler
Posted: Apr 28 2008 - 11:34 AM
Subject: re: DB Table Map with tt_address and different address groups?
Frank,

Couldn't you do just do this for the where clause?

(WHERE) tt_address.group = tt_address_group_mm.a AND fe_groups.id = tt_address_group_mm.b

The field names aren't correct, but maybe that helps?
If nothing else I can probably add a join config option for more flexibility with building queries.

Christoph
Author: Frank Struck
Posted: Apr 28 2008 - 04:19 PM
Subject: re: DB Table Map with tt_address and different address groups?
Christoph,

this query example does the right job in phpmyadmin

CODE:


  SELECT *
  FROM `tt_address` INNER JOIN `tt_address_group_mm`
    WHERE tt_address.deleted=0
     AND tt_address.hidden=0
     AND tt_address.uid = tt_address_group_mm.uid_local
     AND tt_address_group_mm.uid_foreign = 3




but this TS-code is unfortunately not enough and the results are error messages probably because the 2nd table is missing

CODE:


   table = tt_address
    where = tt_address.deleted=0
      and tt_address.hidden=0
      and tt_address.uid = tt_address_group_mm.uid_local
      and tt_address_group_mm.uid_foreign = 3



and something like this doesn't work

CODE:


   table = tt_address inner join tt_address_group_mm



Any other suggestions ?

Frank



user picture Author: Christoph Koehler
Posted: Apr 28 2008 - 05:57 PM
Subject: re: DB Table Map with tt_address and different address groups?
Frank,

Do you think adding a join TS option that is then appended to the FROM clause would be okay for your needs?

Christoph
Author: Frank Struck
Posted: Apr 28 2008 - 06:49 PM
Subject: re: DB Table Map with tt_address and different address groups?
Christoph,

yes, I hope that will do it. I only need to combine these 2 tables. Thanks for your efforts.

Frank

PS: Did you modify the title and description definition for the info bubble content since you released V2.01? After updating to r559 I have the problem that the simple map plugin doesn't accept my custom definition.
user picture Author: Christoph Koehler
Posted: Apr 28 2008 - 08:46 PM
Subject: re: DB Table Map with tt_address and different address groups?
Frank,

Sounds good, I will add that to the next build, probably tonight.
Yes, TS changed to fix an issue with the sidebar. "title" is now a COA instead of TEXT, so you can customize it from there. Docs will reflect the change soon.

Christoph
user picture Author: Christoph Koehler
Posted: Apr 28 2008 - 09:45 PM
Subject: re: DB Table Map with tt_address and different address groups?
Frank,

Please check out a newer development build. You can now do something like this:

CODE:

tables {
  10 {
    table = tt_address
    join = INNER JOIN tt_address_group_mm
    where = tt_address.uid = tt_address_group_mm.uid_local AND tt_address_group_mm.uid_foreign = 1
  }
}


Let me know if there are any problems.
There are also a few more changes to the Simple Map TS. See the static template in pi1/static for more info on what the default looks like now. Should be fairly simple to customize it from there.

Christoph
Author: Frank Struck
Posted: Apr 29 2008 - 09:37 AM
Subject: re: DB Table Map with tt_address and different address groups?
Christoph,

no problems at all. The join is now working really fine and the simple map bubble content as well.

Thank you very much for this great and comfortable extension and the really gorgeous support.

Frank
user picture Author: Mark Stephenson
Posted: Apr 29 2008 - 02:05 PM
Subject: re: DB Table Map with tt_address and different address groups?
Frank,

Great adjectives! LOL

Mark
Author: Thomas Reindlmeier
Posted: Jun 19 2008 - 04:54 AM
Subject: re: re: DB Table Map with tt_address and different address groups?
I just found this thread and thought, I could use this TypoScript snippet (table.* and so on) for getting address data from an other table.

I'm using the Commerce extensions and wanted to get the address data from the table "tx_commerce_manufacturer" together with the radius search form. Unfortunately, the data structure is different, so I receive the message "There doesn't seem to be anything to display. Make sure the map is configured correctly and there are users or markers set".

Is it planned to integrate some kind of "field mapping" within TypoScript? An expression like:

tables {
10 {
table = tx_commerce_manufacturer
fields = name, street, zip, city
}
}

These fields perhaps should be specified in the same order as used in the addMarkerByAddress method?

I hope my thoughts are comprehensive, my English ist not the best ;)

Greetings from football-poisoned Germany
Thomas
Total Posts: 13 - Pages (2): [1] 2
You must login to post a message to this conference.