Products
GG网络技术分享 2025-03-18 16:12 2
I am using Contact Form 7 and Contact Form 7 Database Addon – CFDB7 to save values from my form to the database. The database plugin seems to work fine and saves information to the database, I am able to see all my fields in the WordPress dashboard in the format I would like however it saves all the fields and values in a \"serialized\" form.
enter code here a:17:{s:12:\"cfdb7_status\";s:4:\"read\";s:10:\"user_login\";s:5:\"MyUser\";s:4:\"Date\";s:10:\"2018-11-20\";s:10:\"Name\";s:3:\"ABC\";s:2:\"BS\";a:1:{i:0;s:1:\"B\";}s:3:\"CMP\";s:4:\"1200\";s:3:\"CAB\";a:1:{i:0;s:2:\"CM\";}s:2:\"T1\";s:3:\"200\";s:2:\"T2\";s:0:\"\";s:2:\"T3\";s:0:\"\";s:2:\"SL\";s:3:\"150\";s:8:\"Calendar\";a:1:{i:0;s:2:\"TF\";}s:8:\"Period1C\";s:0:\"\";s:8:\"Period2C\";s:0:\"\";s:2:\"P1\";s:1:\"3\";s:2:\"P2\";s:1:\"6\";s:8:\"TimeType\";a:1:{i:0;s:1:\"M\";}}
The CFDB7 plugin saves the above information in a separate table, however all the field data is saved in a single row. Is there a way or a plugin to save this information as separate columns in my table and all values under those columns. Something like this
User_login: MyUser
Date: 2018-11-20
Name: ABC
BS: B
CMP: 1200
CAB: CM
T1: 200
T2: 0
T3: 0
SL: 150
Calendar: TF
Period1C:
Period2C:
P1: 3
P2: 6
TimeType: Mwhere User_login, Date, Name.... are all separate columns in the table and MyUser, 2018-11-20, ABC.... are the values under these columns for every entry.
Can you please advise how this can be done. The author of the plugin suggests to unserialize. I have read about unserialize but I was not able to do anything with it. I am familiar with SQL but not with PHP yet. I appreciate your help.
图片转代码服务由CSDN问答提供
感谢您的意见,我们尽快改进~
功能建议我正在使用联系表格7和请联系表单7数据库插件 - CFDB7 ,以便将表单中的值保存到数据库中。 数据库插件似乎工作正常并将信息保存到数据库,我能够以我想要的格式在WordPress仪表板中查看我的所有字段,但它以“序列化”形式保存所有字段和值。 </ p>
在此处输入代码a:17:{s:12:“cfdb7_status”; s:4:“read”; s:10:“user_login”; s:5: “MYUSER”; S:4: “日期”; S:10: “二零一八年十一月二十〇日”; S:10: “姓名”; S:3: “ABC”; S:2: “BS”;一个: 1:{I 0,S:1: “B”;} S:3: “CMP”; S:4: “1200”; S:3: “CAB”;一个:1:{I:0; S :2: “CM”;} S:2: “T1”; S:3: “200”; S:2: “T2”; S:0: “”,S:2: “T3”; S:0 : “”,S:2: “SL”; S:3: “150”; S:8: “日历”;一个:1:{I:0; S:2: “TF”;} S:8: “Period1C”; S:0: “”,S:8: “Period2C”; S:0: “”,S:2: “P1”; S:1: “3”; S:2: “P2”; S:1: “6”; S:8: “TimeType”;一个:1:{I 0,S:1: “M”;}} </代码> </ PRE>
< p> CFDB7插件将上述信息保存在单独的表中,但所有字段数据都保存在一行中。 是否有方法或插件将此信息保存为我的表中的单独列以及这些列下的所有值。 像这样的东西</ p>
User_login:MyUser
日期:2018-11-20
名称:ABC
BS:B
CMP:1200
CAB:CM
T1:200
T2:0 \\ nT3:0
SL:150
Calendar:TF
Period1C:
Period2C:
P1:3
P2:6
TimeType:M </ p>
其中User_login,Date,Name .... 表中的所有单独的列都是MyUser,2018-11-20,ABC ....是每个条目的这些列下的值。</ p>
你能告诉我这是怎么回事吗? 完成。 该插件的作者建议反序列化。 我读过关于反序列化但我无法用它做任何事情。 我熟悉SQL但不熟悉PHP。 我感谢您的帮助。 </ p>
</ div>
网友观点:
I was able to resolve this using Save Contact Form 7. I have been using it for about a month and have not encountered an issue.
https://wordpress.org/plugins/save-contact-form-7/
Edit: It is straightforward, you install the plugin, no configuration is required, it creates a custom table in the database with all the fields as separate columns. I have only used number type, text, radio button and dropdowns so far. Apparently, it also has the ability to save csv, pdf but I have never used it so can\'t tell how that works. I noticed that the plugin \\\"hasn’t been tested with the latest 3 major releases of WordPress\\\", however as of now it gets the job done.
Demand feedback