Questions tagged as 'mysql'

1
answer

Object reference not set to an instance of a Visual Studio object

I am having problem in the id variable of my dataGridView, it is giving the following error: "Object reference not set to an instance of a Visual Studio object". I am using Windows Form, MySQL and the DataGridView. Here is the code: //Declaran...
asked by 04.11.2016 / 11:53
1
answer

How to insert data into another table from the foreign key?

I have a table in my database called imoveis where I have some columns in it, highlighting localizacao_fk and correspondencia_fk , both foreign keys that reference the enderecos table. What I want to know is how to ins...
asked by 04.11.2016 / 04:30
1
answer

UPDATE in another table when updating a record does not work - CODEIGNITER - MYSQL

Hello, the code for updating a record in another table does not work. I need to update the vendas table when saving a record of the lancamentos table. In the lancamentos table there is the vendas_id column, which c...
asked by 04.11.2016 / 16:14
2
answers

SQL Syntax Error in creating FK

I want to add a foreign key in the CONSULT However, MySql reports the following error:    1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'REFE...
asked by 06.11.2016 / 20:52
1
answer

Table with select and submit

Hello friends I am trying to make a table, for each item in the table it appears a <select> and a submit that will send data via POST , as it is relative how many units will appear can not predict quantities. Unfortunat...
asked by 05.11.2016 / 21:56
1
answer

Case for various fields

Can I make a query using 1 case for multiple fields? The fields are of type int . If not, can I do it in php? Query select *, (case (pergunta1,pergunta2) when 1 then 'Ótimo' when 2 then 'Bom' when 3 then 'Regular' w...
asked by 07.11.2016 / 11:51
1
answer

Relationship between tables n for n

I'm creating a small project and I'm having a question. Suppose I have a certain types of coffees, these coffees can be served in more than two cup sizes. Since the relationship between tables is from n to n , we have the following tables:...
asked by 23.12.2016 / 05:46
1
answer

Problem with empty Array with mysql and nodejs

This is the action that is activated when loading the page: In it I get the following array as result. My problem is, when I have no records the ARRAY returns empty, I can not pass a parameter to the INPUT. Ex: input (value="# {data [0] [0]...
asked by 23.12.2016 / 14:42
1
answer

Join with the same table more than once

I'm having a problem performing a query . The original table calls tbl_operacao , and contains the fields: id , tipo_operacao , idimovel , idproprietario , idlocatario , idseguro , idvalores ....
asked by 04.01.2016 / 06:10
1
answer

Difficulty in handling the query

Personal I have the following query: SELECT p.ra, p.nomealuno, qa.respostaaluno, q.respostacorreta FROM prova p INNER JOIN questoes_aluno qa ON qa.idprova = p.id INNER JOIN questao q ON q.id = qa.idquestao AND q.iddisciplina = 46 ORDER BY p.i...
asked by 06.12.2016 / 21:07