Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2012-08-02 17:38:27

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: etc_query: all things Textpattern

Ok … I can answer that — give me a second —-

Offline

#62 2012-08-02 17:47:29

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: etc_query: all things Textpattern

glz_custom_fields stores it data in a seperate table called custom_field — the multi-select data is stored no differently that I can tell than the drop down data — just invidiual rows with values —-

An example would be:

ID | NAME | VALUE
108 | custom_4_set | XMRadio
109 | custom_4_set | Moon Roof

Last edited by progre55 (2012-08-02 17:50:33)

Offline

#63 2012-08-02 17:53:29

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: etc_query: all things Textpattern

Ah, pity. I hoped it was in textpattern table, something like XMRadio, Moon Roof. Then we need the table structure: what are its fields?

Offline

#64 2012-08-02 17:57:51

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: etc_query: all things Textpattern

Actually — there are only three fields in the table: ID | NAME | VALUE — as you can see from below —- the drop down (Price) custom_3 is no different than the multi-select custom_4

ID | NAME | VALUE
106 | custom_3_set | 25000
107 | custom_3_set | 30000
108 | custom_4_set | XMRadio
109 | custom_4_set | Moon Roof

Last edited by progre55 (2012-08-02 17:58:41)

Offline

#65 2012-08-02 18:08:13

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: etc_query: all things Textpattern

Ok, and can you retrieve articles by multi-select: <txp:article_custom custom_4_set="XMRadio,MoonRoof" /> or something like this?

Offline

#66 2012-08-02 18:32:07

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: etc_query: all things Textpattern

Using this <txp:article_custom custom_4_set="XMRadio,MoonRoof" /> did not work —

So I used this <txp:article_custom Price="25000" /> and it worked — which I know is a drop down field but wanted to make sure I could move the ball forward — so I think using the field name is the way to go —

The I tried this <txp:article_custom Features="XMRadio,MoonRoof" /> and unfortunately it returned nothing —-

Offline

#67 2012-08-02 18:34:58

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: etc_query: all things Textpattern

One thing to note — if I use this <txp:article_custom Features="" /> it does return the articles that are not using that Custom Field

Offline

#68 2012-08-02 18:42:03

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: etc_query: all things Textpattern

Maybe it was Moon Roof (with a space), sorry. Anyway, do ID correspond to articles’ ID?

Offline

#69 2012-08-02 18:49:09

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: etc_query: all things Textpattern

ID appears to be just a unique identifier and does not correspond to Article ID.

Last edited by progre55 (2012-08-02 18:49:20)

Offline

#70 2012-08-02 18:54:57

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: etc_query: all things Textpattern

Also, what I discovered is that this will return a result <txp:article_custom Features="XMRadio" /> if the article does not have any other features selected

Offline

#71 2012-08-02 19:26:47

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: etc_query: all things Textpattern

Well, and what is in custom fields of textpattern table, for example in Features?

Offline

#72 2012-08-02 19:34:38

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: etc_query: all things Textpattern

XMRadio|Moon Roof

Offline

Board footer

Powered by FluxBB