【发布时间】:2010-09-07 07:28:55
【问题描述】:
我使用 Drupal 6.19 版和 Drupal 中的 webform 模块来创建表单。我的站点上有两个表单。当用户提交表单时,drupal 数据库中为每个表单保存的条目在哪里?
请帮忙 谢谢你
【问题讨论】:
标签: php database drupal drupal-6 drupal-modules
我使用 Drupal 6.19 版和 Drupal 中的 webform 模块来创建表单。我的站点上有两个表单。当用户提交表单时,drupal 数据库中为每个表单保存的条目在哪里?
请帮忙 谢谢你
【问题讨论】:
标签: php database drupal drupal-6 drupal-modules
只需在webform.install 中查看它的数据库架构。
...
$schema['webform_submitted_data'] = array(
'description' => 'Stores all submitted field data for webform submissions.',
'fields' => array(
'nid' => array(
'description' => 'The node identifier of a webform.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'sid' => array(
'description' => 'The unique identifier for this submission.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'description' => 'The identifier for this component within this node, starts at 0 for each node.',
'type' => 'int',
'size' => 'small',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'no' => array(
'description' => 'Usually this value is 0, but if a field has multiple values (such as a time or date), it may require multiple rows in the database.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '0',
),
'data' => array(
'description' => 'The submitted value of this field, may be serialized for some components.',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
),
'indexes' => array(
'nid' => array('nid'),
'sid_nid' => array('sid', 'nid'),
),
'primary key' => array('nid', 'sid', 'cid', 'no'),
);
...
【讨论】:
webform_submissions 和webform_roles 这些表的架构吗?谢谢。
webform.install文件中,看看那里。
你应该使用:
首先,登录mysql
之后,使用database_name;
您必须替换为数据库的名称
然后,显示表格;
最后一句会告诉你数据库的表
现在,从 webform_submitted_data 中选择 *;
您应该能够看到数据。
【讨论】:
您还可以通过导航到内容管理 > 网络表单来查看提交的数据。我相信数据在数据库中是序列化的,所以如果你有很大的表格,它不容易阅读。
【讨论】: