How to insert data through SQL Console

English! place to talk about development, programming and coding
Post Reply
sayaksic
Znuny newbie
Posts: 1
Joined: 19 Mar 2014, 18:06
Znuny Version: 3.1.9

How to insert data through SQL Console

Post by sayaksic »

Hi!

Im trying to insert data into the tables customer_users and group_customer_user directly from the SQL Console.

What im I doing wrong?

INSERT INTO customer_user
(id, login, email, customer_id, pw, title, first_name, last_name, phone, fax, mobile, street, zip, city, country, comments, valid_id, create_time, create_by, change_time, change_by)
VALUES
(NULL, 'xxxxx', 'xxx@xx.cl', '17342931-2', NULL, NULL, 'Name', 'lastname', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,1,'2012-09-18 17:25:36', 1, '2013-04-12 14:20:03', 1)


INSERT INTO group_customer_user
( user_id, group_id, permission_key, permission_value, create_time, create_by, change_time, change_by )
VALUES ( 'sayaksic', 420, 'rw', 1, '2014-03-19 12:18:00', 22, '2014-03-19 12:18:00', 22 )



Thank you for your help!
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to insert data through SQL Console

Post by crythias »

sayaksic wrote:Im trying to insert data into the tables customer_users and group_customer_user directly from the SQL Console.
It won't work because it's a read-only interface.

Also, don't do that. There are command line scripts that will handle this via API.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply