Questions tagged as 'mysql'

2
answers

Registration confirmation email

I made a cpf and email address. I've already put it to validate cpf and such, and I can send the email to the user who put the email there, but I need the registration to be done only if the email actually exists. In the case, would I have to do...
asked by 04.12.2017 / 13:41
3
answers

Search Database when Select options Select

Good morning. I have a small problem that I can not solve. The situation is as follows: I have 2 selects (state and city), I would like when selecting a state the system would search my DB to find distributors of that state and when selecting th...
asked by 11.12.2017 / 12:05
1
answer

How to use foreign key to create a record in another table

I have two tables users and users_info , I would like to use foreign key, so when I create a record in the users table, create a record with the empty fields in the users_info table, only with the id_user complet...
asked by 04.09.2017 / 14:26
1
answer

Update does not update bank records

In my system there is a registration page and a page with a table of the information of the registered ones. This table has an edit button that links to an equal form on the registration page. What should happen: When you click the save...
asked by 06.09.2017 / 13:36
2
answers

Display date of MySQL in date field

I have a customer registration page with a field for date of birth. I can choose a date and save it in the database. But when I go back to that client's signup screen this field ( type="date" ) is not displaying the value saved in the data...
asked by 06.09.2017 / 20:50
2
answers

Hide mysql select field

Well I'm used to doing the select as follows: select nome, idade,cidade from cadastro This select returns me the fields name, age, city. But I want to do the opposite, I have a table with many fields and I want the select to return all t...
asked by 18.08.2017 / 14:26
1
answer

Laravel 5.3 update field JSON MySql - # 3143 - Invalid JSON path expression

Query generated by laravel: update 'informations' set 'parameters' = json_set('parameters', "$.'Campo teste'.type", 'string'), 'parameters' = json_set('parameters', "$.'Campo teste'.value", 'Novo valor') where 'parameters'->'$."Identificaçã...
asked by 24.08.2017 / 18:16
2
answers

How to automatically add two columns from two different tables and perform insert into another table in MySQL?

I'm starting the database work and would like to do some smart action on the database. I have two tables that hold different sensor information, each with its own columns. I would like to get a column of each table (of my choice) and perfo...
asked by 01.05.2018 / 05:07
1
answer

Insert array from ajax into mysql database

I have this ajax that shows the items chosen in the " checkbox " of the form. $(document).ready(function(){ $('#submit').click(function(){ var languages = []; $('.get_value').each(function(){...
asked by 17.05.2018 / 22:11
1
answer

How to insert into the table if the record does not exist [duplicate]

How to insert into the table if the record does not exist, for example the table_materia_materia, has the following information: +----+-------+---------+ | ID | turma | materia | +----+-------+---------+ | 1 | 1 | 1 | | 2 | 1...
asked by 15.05.2018 / 22:47