Failed to execute SQL : SQL INSERT INTO `jos_users` (`id`,`name`, `username`, `password`, `params`) VALUES (LAST_INSERT_ID(),'Administrator2', 'admin2',
'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', ''); INSERT INTO
`jos_user_usergroup_map` (`user_id`,`group_id`) VALUES (LAST_INSERT_ID(),'8'); failed :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`) VALUES (LAST_INSERT_' at line 1

Could someone tell me where my Syntax might be wrong? I'm using MySQL version 5.0.95.

1 Answer
1

Use back ticks (`) around column name password (password is a reserved work in MySQL) if you are not using. Don't use LAST_INSERT_ID() in the first query as you have not added any record to this table yet. The queries will be