Questions tagged as 'mysql'

1
answer

Is it possible to count the word order in a field via MySQL?

Good afternoon! I'm not an expert on mysql - so I doubt it - it might even be silly. I have a field in a database where a color preference list is stored. Ex: Joao prefere: Azul, Verde, Vermelho. Maria prefere: Verde, Azul, Vermelho P...
asked by 18.09.2018 / 22:40
1
answer

How to create records in the MYSQL table according to the value of the variable $ nregistros PHP

I have a $ nregistry variable that defines the value of records to insert into the "forms" table. If $ nregisters is equal to 4 for example, it should enter 4 rows as follows: formularios id|campo 6 | 1 7 | 2 8 | 3 9 | 4 The field "id" i...
asked by 02.10.2018 / 21:04
1
answer

What is the best way to record a user log?

I have a small monitoring system that aims to show if the data on some servers are the same as the backups . As the system interacts directly with the database, there was a need to know who was accessing and when accessing the system, as I a...
asked by 21.02.2018 / 14:32
2
answers

MySQL count in substrings in the columns of a varchar field

I have the following sample table: ID_USER | FRUTAS ----------------------------- 1 | Laranja;Banana;Maçã 2 | Abacaxi;Laranja;Uva 3 | Pera;Laranja;Banana;Melão It would be possible to perform a select count with order...
asked by 15.02.2018 / 20:14
1
answer

How to auto increment in MySQL without declaring the columns in INSERT?

I noticed that when I have a column with auto_increment , I have to declare the columns in INSERT . For example, I created this test table: create table teste( id int auto_increment, nome varchar(100) not null, valor decimal(5,2...
asked by 30.07.2018 / 01:52
1
answer

The insert of the Node express with problem

I'm new as a Node Express programmer with Mysql, I created the implementation to save, however he created the registry with null in the table, see how I performed the test in postman; This is my entity; module.exports = (sequelize, Se...
asked by 30.07.2018 / 13:39
2
answers

Recovering bank data and calculating inputs

Good night, I'm having a hard time recovering a data in the I recovery but I wanted the recovery to be simultaneous. I'll explain it better and as soon as I see the code, I'll understand. include("banco/banco.php"); $prod = $conexao_pdo->p...
asked by 01.01.2018 / 22:47
1
answer

ORDERBY, ignore accents

I have a name column that belongs to the Producer_BVU model, whose names are: 2M1J A. Coelho ÓRBITA Bruno When I order: \App\Producer_BVU::orderBy('name', 'ASC')->get(); The output is: ÓRBITA 2M1J A. Coelho Bruno...
asked by 04.01.2018 / 10:50
2
answers

Ajax return a result loop

I'm doing a financial system with ajax, both revenue and expenses have "descriptions" and to edit the information of a recipe I call its information but I have to pull the descriptions tbm. But the thing is that I use append on the front end to...
asked by 16.12.2017 / 18:05
2
answers

What are real and practical examples of using Stored Procedures?

While attending an interview for the developer position, I come across a question related to Stored Procedure SP ) and at first I have theoretical knowledge on the subject, but I have never come across a practical example in the use of SP and...
asked by 04.12.2017 / 19:31