SQL Box

Moderator: crythias

Post Reply
mzydelis
OTRS newbie
Posts: 12
Joined: 11 May 2018, 15:12
OTRS Version?: OTRS-6.06

SQL Box

Post by mzydelis » 16 May 2018, 14:18

Hello everyone,

I have run into a problem working with SQL Box. I do not manage to get exact table information, for example what I am trying to get is from a ticket information a distance traveled and time. I manage to find tables, but do not manage to open them. SHOW OPEN TABLES do not work.

Code: Select all

SELECT *
FROM dynamic_field
WHERE ID=68 OR ID=69

reneeb
OTRS guru
Posts: 4667
Joined: 13 Mar 2011, 09:54
OTRS Version?: 3.3.x
Company: Perl-Services.de
Contact:

Re: SQL Box

Post by reneeb » 16 May 2018, 16:12

Code: Select all

select * from dynamic_field_value where object_id = <ticket_id> where field_id in (68,69)
Perl / OTRS development: http://perl-services.de
Free OTRS add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de

mzydelis
OTRS newbie
Posts: 12
Joined: 11 May 2018, 15:12
OTRS Version?: OTRS-6.06

Re: SQL Box

Post by mzydelis » 17 May 2018, 08:10

Thank you reneeb!

One more thing, is it possible to connect it with person who created this ticket and driven all this distance and spent his time?

mzydelis
OTRS newbie
Posts: 12
Joined: 11 May 2018, 15:12
OTRS Version?: OTRS-6.06

Re: SQL Box

Post by mzydelis » 23 May 2018, 07:33

If anyone is interested code is:

SELECT FIELD_ID, VALUE_TEXT, first_name, last_name
FROM dynamic_field_value, ticket, users
WHERE dynamic_field_value.field_id in (68,69) and ticket.id = OBJECT_ID and RESPONSIBLE_USER_ID = users.id

Post Reply