ExpressionEngine自定义mysql字段
当前端用户按照下面的 jQuery 代码单击按钮 #bbb
时,我想将 var x 的值保存到名为“test”的自定义字段中的用户数据库中。我还在学习EE。我们如何创建自定义字段并将内容保存到其中。
$('#bbb').click(function(){
var x = 'some content';
});
When user in the front-end clicks on the button #bbb
as per the jQuery code below, i want to save the value of var x into the database for the user in a a custom field called 'test'. I'm still learning EE. How do we create a custom field and and save content to it.
$('#bbb').click(function(){
var x = 'some content';
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我用这个。让事情变得超级简单:
http://devot-ee.com/add-ons/external -条目/
I use this. Makes things super easy:
http://devot-ee.com/add-ons/external-entries/
我可能会通过创建自定义成员字段来为用户添加自定义字段。
http://expressionengine.com/user_guide/cp/members/custom_member_fields_edit.html
然后你必须在 mySQL 中找到该字段,这样你就知道如何写入它,我不确定是否将列附加到 exp_members 表中,或者是否有另一个字段,但我确信你可以使用 phpMyAdmin 找到它。
您需要使用单击功能更新数据库。 (这与EE无关)。简单示例: http://perfectwebtutorials .com/2011/write-and-delete-data-in-mysql-with-jquery-and-php/
I'd probably add custom field for a user by creating a custom member field.
http://expressionengine.com/user_guide/cp/members/custom_member_fields_edit.html
Then you have to find that field in mySQL so you know how to write to it, I'm not sure if columns get tacked on to the exp_members table or if there's another but I'm sure you could find it using phpMyAdmin.
You'll need to update the db using your click function. (This has nothing to do with EE). Simple example: http://perfectwebtutorials.com/2011/write-and-delete-data-in-mysql-with-jquery-and-php/