当前位置: 动力学知识库 > 问答 > 编程问答 >

sql - Error when submitting registration form Joomla 3

问题描述:

When a user clicks register on my site they get an error

SQL:

UPDATE `jos_user_usergroup_map`

SET user_id = 93 , group_id =

WHERE user_id=93

This doesn't affect the registration, the users are been added to the database. How can I stop this error from showing?

网友答案:

You are missing a value for group_id

UPDATE `jos_user_usergroup_map` 
SET user_id = 93, 
    group_id = 
WHERE user_id=93

Should be like this

UPDATE jos_user_usergroup_map
SET group_id = 123
WHERE user_id = 93
网友答案:

group_id = has no value. Check your sql paramaters. For joomla Registered group's default id is 2. So you can give the value manually.

UPDATE `jos_user_usergroup_map` SET user_id = 93 , group_id =2 WHERE user_id=93

You can find the default id's for user groups for Joomla!

1 Public 
2 Registered 
3 Author 
4 Editor 
5 Publisher 
6 Manager 
7 Administrator 
8 Super Users 
9 Guest

Another point is why do you update user_id while it is same? There is no need.

UPDATE `jos_user_usergroup_map` SET group_id = 2 WHERE user_id=93
分享给朋友:
您可能感兴趣的文章:
随机阅读: