php - SQL=INSERT INTO `#__user_usergroup_map` (`user_id`,`group_id`) VALUES (, 2) -- database was not updated -


i have responsibility of joomla! 3.5.1 website. new users added script in 'operator' may add member. however, have encountered problem message, " sql=insert #__user_usergroup_map (user_id,group_id) values (, 2) -- database not updated" returned.

i have looked in jfacotry api & found module 'com_users" holds script makes bind data params & passes sql execution of insert statement #__user_usergroup_map table.

however, don't see sql statement in execution of code. $user->geterror returns sql error.

my understanding of problem, code not providing user id 1 of 2 required variables insert statement. when process works, code generates new user id & provides sql statement.

this has worked in past since using joomla! 1.5. moving joomla! 3.5.1 want maintain same member addition methodology.

is there special constraints upon #__user_usergroup_map table not in place?

can help?

you must use mark ' , user_id value auto increment values empty.

$sql = mysql_query("insert `__user_usergroup_map` (`user_id`,`group_id`) values ('', '2')"); 

Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -