ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Selecting custom field values directly

November 01, 2010 5:03pm

Subscribe [2]
  • #1 / Nov 01, 2010 5:03pm

    jbarry

    1 posts

    I have been hunting around for a solution to this but come up empty. I just got thrown into supporting several EE applications and it may just be that I don’t have the EE vocabulary yet, to recognise the solution I’m looking for.  Here’s the issue:


    One page in my application generates a pdf based a given members custom field value.  The field (Created here—> Channel Administration ›  Field Groups ›  Custom Fields ) is a field matrix and contains an array of four checkboxes and one text field.  The page that generates the PDF can have no other output, even if it’s hidden so putting the field in a hidden div and extracting the values with javascript is out. Simply assigning the field to a php variable doesn’t work either because it’s surrounded in html tags some of which have attributes that are surrounded by quotes.  I can’t escape the EE field so what I want to do is just select the values out of the database.  It appeared that the solution was in the table exp_weblog_data.  I found a column there with the correct field id (field_id_107) the field_ft_107 is set to xhtml but I don’t see the value anywhere.

    I am using ee version 1.6.7

    Any help would be much appreciated.

    Thanks

  • #2 / Nov 08, 2010 5:43am

    Fusion Design

    128 posts

    You’ll probably want to be getting the data from the exp_matrix_data field.
    Something along the lines of:

    {exp:query sql="SELECT col_id_XX FROM exp_matrix_data WHERE entry_id = 'whatever'"}
      {col_id_XX}
    {/exp:query}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases