Questions tagged as 'mysql'

1
answer

How to create a Trigger for a specific column of a table?

I created a trigger for my X table, for the purpose of making a update record that runs on this table. For each update in the X table, modified (old) values are stored in the Z table. PROBLEMATIC : The X table has several...
asked by 20.12.2016 / 12:36
1
answer

Form does not insert data into the database after submitted

Why does not the following code enter? Someone experienced can tell me the code below does not show error yet does not insert in the bank. <form action="index.php" method="post"> addcurso:<input name="nome1" type="text"> <inpu...
asked by 12.11.2016 / 13:41
1
answer

Insert multiple data into a mysql column

Good afternoon, I'm breaking my head about how I do this insertion in the bank, it's something like this ... I have a product, which needs to be priced from more than one vendor, to compare prices. But my quantity of supplier depends on the q...
asked by 22.01.2017 / 18:16
1
answer

Doubt with this query [closed]

My teacher did the following query to show the total quantity of stock of each product, however I did not quite understand how it does to generate the total inventory quantity of each product, follows the query: SELECT SUM (ret.quantidade) A...
asked by 02.12.2016 / 16:32
1
answer

How to get an image of the save screen in the project folder and save the path in Mysql database?

So, I have a jsp with form, it converts the image to b64 and sends as a pro servlet string the servlet converts to b643 String stt = request.getParameter("base64img"); try{ String parts[] = stt.split(","); Strin...
asked by 04.12.2016 / 16:28
2
answers

Select in MySQL ignoring single quotes

Hello How can I use this select and ignore value with single quotes? . . .st.executeQuery("select * from tabela_A where id = uc"); rs = st.getResultSet(); while (rs.next()) { texto = rs.getString("rua")...
asked by 02.12.2016 / 17:34
2
answers

Multiple if in an SQL condition

I'm trying to use 2 if s but the result always returns empty, when I use only if it will. SELECT aci_codigo, aci_valor_pagamento, bai_fk_pes_codigo, aci_tipo_pagamento, aci_fk_ftm_codigo, aci_nosso_numero, ftm_descr...
asked by 02.12.2016 / 15:07
1
answer

SELECT to filter null value? [duplicate]

I'm trying to make a SELECT in a conta table, in this table I have a foreign key for the venda table, in certain cases this foreign key is null and I want to return the information of the sale when this key i...
asked by 30.10.2016 / 01:17
1
answer

Back up the mysql database in PHP

I need a backup button so I can select a folder where it will save my mysql data .. I've found some mysql dump codes but all with save location set via code and what I actually need is that it is possible to choose where to save it. Does anyone...
asked by 27.10.2016 / 19:16
1
answer

Return value entered after performing INSERT

I have a following table: CREATE TABLE tblUser ( id INTEGER PRIMARY KEY AUTOINCREMENT, uuid VARCHAR(24) NULL, name VARCHAR(256) NULL } I'm inserting a uuid random so that it's a unique identifier directly inside my databa...
asked by 10.12.2016 / 14:40