Select from mysql databases
Moderator: crythias
Select from mysql databases
You must make a request to the database and display the result on the form in the required field. After reading the documentation I came to the conclusion that it is necessary to use jquery + ajax + perl. Embed code in the template file, but the result will not be displayed. Prompt please, move and how it can be realized which way? Maybe there is another way?
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Select from mysql databases
??? Please provide more details! What do you want to achieve?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: Select from mysql databases
There FIELD1 field.
I enter a value. I press the FIND button.
In the field of FIELD2, FIELD3 selected values on request "Select first_name,last_name from users WHERE id=FIELD1"
I enter a value. I press the FIND button.
In the field of FIELD2, FIELD3 selected values on request "Select first_name,last_name from users WHERE id=FIELD1"
Re: Select from mysql databases
Maybe you should try to write down your question in your native language...
Afterwards use https://translate.google.com and copy/paste the result
Afterwards use https://translate.google.com and copy/paste the result
LIVE: OTRS 5.0.14 || Debian || MySQL/LDAP
TEST: OTRS 5.0.14 || Debian || MySQL/LDAP
TEST: OTRS 5.0.14 || Debian || MySQL/LDAP
Re: Select from mysql databases
I try
1. I have added a new table in the database OTRS
2. I would like to request to select data from a table on the form of the creation of the ticket
To do this, you need to write a new module? How to do it right and just?
1. I have added a new table in the database OTRS
2. I would like to request to select data from a table on the form of the creation of the ticket
To do this, you need to write a new module? How to do it right and just?
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Select from mysql databases
So you have a new table and you want to display its values in the ticket creation form. Correct?
Do you want to store the selected value in the ticket?
Do the shown values depend on other information (e.g. selected queue)?
Do you need to access the table elsewhere (other forms, ticket zoom, ...)?
...
If you want to store the selected value in the ticket, you might use a dynamic field.... Install http://opar.perl-services.de/dist/DynamicFieldRemoteDB, then create a new dynamic field for the ticket. It should have the type RemoteDB. Configure the access to your table. Activate the new dynamic field for the ticket creation forms (AgentTicketPhone and AgentTicketEmail) and the ticket zoom.
Do you want to store the selected value in the ticket?
Do the shown values depend on other information (e.g. selected queue)?
Do you need to access the table elsewhere (other forms, ticket zoom, ...)?
...
If you want to store the selected value in the ticket, you might use a dynamic field.... Install http://opar.perl-services.de/dist/DynamicFieldRemoteDB, then create a new dynamic field for the ticket. It should have the type RemoteDB. Configure the access to your table. Activate the new dynamic field for the ticket creation forms (AgentTicketPhone and AgentTicketEmail) and the ticket zoom.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: Select from mysql databases
Yes, yes,yes...reneeb wrote:So you have a new table and you want to display its values in the ticket creation form. Correct?
Oh sure! They will be saved along with the ticket.reneeb wrote:Do you want to store the selected value in the ticket?
Yes! This is the main problem. The condition for the request can be any value. For example, I type the number 1 and get information on my table where the ID field is set to 1 at the right field to me.reneeb wrote:Do the shown values depend on other information (e.g. selected queue)?
Re: Select from mysql databases
I installed DinamichFildRemoteDB.
Excellent work, the information is taken from the database and inserted into the field. But what if you need to select more than one value at once a search? Insert the result into the table?
Excellent work, the information is taken from the database and inserted into the field. But what if you need to select more than one value at once a search? Insert the result into the table?