Hello,
for a select field on a content type I have php returning an array for custom options. Where in the database does Drupal store which option they choose? I have looked on throughout each table but cannot locate it.
I know that when the options are entered manually, they are put into a table: content_field_FIELD NAME
Any help is much appreciated!
Thanks!
Dan Silver

Comments

G Gavitt’s picture

A field like that will be stored under the main content type. If your browsing your database it will be under content_type_yourexample. From there you can see all the fields that are associated with that content type and the data they contain.

Dan Silver’s picture

ok, I found it, but it appears to only store the number, not the actual value. How could I get the value?

G Gavitt’s picture

What kind of field are trying to get the value from? I am assuming its data from a drop down cck field..? but maybe I am way off in understanding what you are trying to do..

fureigh’s picture

Try node_data_field_FIELDNAME. (More specifically, node_data_field_FIELDNAME.field_FIELDNAME_value.)

The Views module can be a handy way to find this sort of thing. Just start to create a View that displays the information you want, then copy and work off of the SQL displayed at the bottom of the page in the Views UI.