Php 将drupal webform数据保存到数据库
我使用Drupal版本6.19和Drupal中的webform模块创建表单。我的网站上有两个表单。当用户提交表单时,Drupal数据库中每个表单的条目保存在哪里 请帮忙Php 将drupal webform数据保存到数据库,php,database,drupal,drupal-6,drupal-modules,Php,Database,Drupal,Drupal 6,Drupal Modules,我使用Drupal版本6.19和Drupal中的webform模块创建表单。我的网站上有两个表单。当用户提交表单时,Drupal数据库中每个表单的条目保存在哪里 请帮忙 谢谢只需在webform.install中查看其数据库架构即可 ... $schema['webform_submitted_data'] = array( 'description' => 'Stores all submitted field data for webform submissions.',
谢谢只需在
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.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'),
);
...
您还可以通过导航到Content Management>Webforms来查看提交的数据。我相信数据是在数据库中序列化的,因此如果您有大型表单,则不容易阅读。您也可以通过导航到内容管理>Webforms来查看提交的数据。我相信数据是在数据库中序列化的,因此如果您有大型表单,则不容易阅读。您应该使用:
首先,登录mysql
之后,使用数据库名称
必须替换为数据库的名称
然后,展示表格
最后一句话将向您展示tha数据库的表
现在,从webform\u submitted\u数据中选择*
您应该能够看到数据。您应该使用:
首先,登录mysql
之后,使用数据库名称
必须替换为数据库的名称
然后,展示表格
最后一句话将向您展示tha数据库的表
现在,从webform\u submitted\u数据中选择*
您应该能够看到数据。您能告诉我这些表的模式吗?webform\u提交文件
和webform\u角色
?谢谢。嘿,我只是想知道上面两张表的模式。如果你能告诉我。谢谢。表架构都是在webform中定义的。安装文件,看一下。哦,我明白了。我想我已经读过了,但不幸的是我忘记了那部分。再次感谢你,朋友。:)你们能告诉我这些表格的模式吗,webform\u提交文件
和webform\u角色
?谢谢。嘿,我只是想知道上面两张表的模式。如果你能告诉我。谢谢。表架构都是在webform中定义的。安装文件,看一下。哦,我明白了。我想我已经读过了,但不幸的是我忘记了那部分。再次感谢你,朋友。:)