Questions tagged as 'mysql'

1
answer

Error registering in Mysql [closed]

I'm trying to register with form of the system, however I'm getting the following message: Error : Cannot add or update a child row: a foreign key constraint fails ('gpiweb_pdi'.'avaliacoes_simulados', CONSTRAINT 'fk_usuario_c...
asked by 22.04.2016 / 16:44
2
answers

Checking with Two Tables

I'm trying to create a system where I have two tables one call from acompanhamentos and the other produtos . Within the accompanying table there is the sincroniza column where I write several numbers separated by a comma,...
asked by 26.04.2016 / 17:42
1
answer

How to check the error "SQLSTATE [42S22]: Column not found: 1054 Unknown column"

I would like to know how I can check this error in my code "SQLSTATE [42S22]: Column not found: 1054 Unknown column" private $ Indo-national; public function RetornaIndoperacionais($ano){ if($ano == '2016'){ $_base = "pla_est_2016...
asked by 25.08.2016 / 23:03
2
answers

When I do the UPDATE it saves in the bank correctly, but when I refresh the page the data comes out of the bank

I'm trying to retrieve data from a table inside an input where the user can be updated and save to the same table through UPDATE. I was able to do the UPDATE, but I edit the data by input and send, it saves in the right bank, but when I refresh...
asked by 02.08.2016 / 17:53
1
answer

Foreign key SQL SET NULL

Good people, let's go to one more question, I hope you can help me. I have the following problem: When I create a foreign key linking to another field in another table I always define it as CASCADE . But when I enter a field (say in thi...
asked by 08.04.2016 / 03:40
1
answer

Column type for support table

I have a client table and would like to create a support table to avoid creating many columns (address, phone, telephone1, email, email1, email2, car nameplate, mother name, etc.). The support table consists of the customer code, field and va...
asked by 05.04.2016 / 19:58
1
answer

Use variable in 2 php files

I'm having a little problem trying to use 1 variable that comes from another php file. Ex: I have a connection file where I have all the data about the database, but in the insert file I need to use one of the connection file variables in the my...
asked by 06.06.2016 / 08:39
1
answer

Database Encoding - German Characters

I come across a strange situation, when I try to insert German characters (ä, ä) into the database they are inserted as follows: "üüü " The field is set to utf8_general_ci If you insert the data in a query directly into the dat...
asked by 02.06.2016 / 17:21
2
answers

Return Attribute Group for a specific category

I have 3 tables: ( link ) tb_attributes, tb_atr_to_prod, tb_atr_to_cat. The TB_ATRIBUTOS table has all parent and child attributes. The TB_ATR_TO_PROD table has all the attributes with their respective products. The TB_ATR_TO_CAT table has...
asked by 31.05.2016 / 21:33
2
answers

how to get a correct sequence in order by mysql?

It has a sequence of numbers 1 through 20 I would like to know if you can get the sequence of the correct number, for example: 1,2,3,4,5,6,7,8,9,10,11 ... As this query select * from table order by asc number; It looks like this: 1,1...
asked by 12.07.2016 / 19:52