Most voted "mysql" questions
Mysql is a relational database management system (RDBMS) that functions as a server, and provides access to multiple users simultaneously. Your source code is available under the GNU General Public License.
Learn more…10,264 questions
Sort by count of
-
1
votes0
answers37
viewsGroup a date field in months
Good afternoon, could someone help me? How can I put this query to display from January to December correctly? SELECT EMPRESA,ATIVIDADE,DATA,STATUS FROM tbl_atividades WHERE YEAR(dt_vencimento) =…
-
1
votes0
answers60
viewsAdding Records with Specific Data
Well, I’m currently working on a project that we use Clientdataset’s to communicate with the database. My problem is Next, I have a Receiving Report in the Export Sector, in which there are several…
-
1
votes0
answers13
viewsCheck or Constraint
Talk, guys, good morning I was wondering if you could do the following: I need to make sure that the data entered in a date column is between two dates that are in another table. Example: create…
-
1
votes1
answer34
viewsIntegration between Mysql banks giving error 1442?
Hello! I have the following problem to solve: bank 1 cannot interact directly with bank 3, so I need an interface that interacts between them, which I called bank 2. Seat 1 inserts into seat 2; seat…
-
1
votes0
answers92
viewsFilter records with predefined time intervals in Mysql, using PHP
I am making a Datalogger system and I would like to know if there is any intrinsic function of Mysql to pick up, on the record search screen, the value in a pre-time intervaldefined, or if I must…
-
1
votes1
answer75
viewsPHP connection - Lumen
I am learning PHP with Lumen and came across a problem in the api connection string. I have mysql installed and can use it normally via Workbench. When I click to see the connection information, an…
-
1
votes0
answers34
viewsMysql - Exception
all right? I’m studying Java and I’m having trouble connecting to a Mysql database, below the generated Exception: conectando ... nov 06, 2019 4:32:35 PM…
-
1
votes1
answer136
viewsHow to configure the pdo_mysql driver in Laravel 6
Laraveldoctrine ORM Exceptions Drivernotfound : Driver [pdo_mysql] not supported. My database.php configuration file is as follows: 'mysql' => [ 'driver' => 'pdo_mysql', 'url' =>…
-
1
votes1
answer1155
viewsProblem running Migrations on Laravel
I am trying to run the Migrations on the Windows and bumped into the following error, do not know if and connection to the database what can be Illuminate\Database\QueryException : SQLSTATE[HY000]…
-
1
votes0
answers373
viewsWhat size should I set to store a Base64 string in a VARCHAR field?
I need to store an image that is in Base64 in the mysql database... My doubts are: 1 - I must compress this string before saving to the bank, if yes what is the best way to do this? 1.2 - The Base64…
-
1
votes1
answer51
viewsLaravel query returns "wrong" result
I have a table called "tabela_precos", with the following structure: categoria_veiculo_id | valor | preco_min | preco_max | tipo_veiculo 22 77,70 0 2500 carros 22 30,35 15000 20000 carros When I run…
-
1
votes1
answer44
viewsMysql select consecutive days
All right?! I have selected below to bring the days where there is event 99. If there is more than one event 99 on the same day it brings the day only once. I would like to improve this select to…
-
1
votes1
answer105
viewsRepository Application Startup Failure Not Found When Starting Springboot
I am trying to run my spring boot project with mysql connection and this giving the following failure Description: Error Starting Applicationcontext. To display the conditions report re-run your…
-
1
votes1
answer35
viewsUse another class method to register in the database using DAO
I have to record data in a database, but one of these data is calculated by another class, I wanted to know how to take the database data and put it in the method calculation and then record the…
-
1
votes1
answer223
viewsHow do I create an alert through a Trigger by not blocking the Insert?
Guys, usually whenever I create a Rigger is to perform insertion blocking or only update values. But this time I just need the system to alert not stopping the person performing the document…
-
1
votes0
answers57
viewsINNER JOIN does not return all records
Talk people, good morning. I have two tables in my bank (client and phone), where some clients have several records and others none. Initially I was having trouble "nesting" all the phone table…
-
1
votes1
answer177
viewsHow to get the database id of each TD from the html table
Goodnight I have a button that holds the bank id of each <td> in a row, I send this id to open a file in another tab, and now I’ve added a second function on this button to get the id in the…
-
1
votes1
answer41
viewsReturn cluster in Mysql vector
I am trying to assemble a Mysql query with multiple joins, in this query has a column that may or may not come duplicated, I would like to put the duplicated rows by this column in an array, using…
-
1
votes0
answers132
viewsVehicle registration with PHP and Mysql
Good morning, I’m starting in php and Mysql. I’m trying to develop a system for registering a vehicle (with photo), and studying a little, I got into php language together with MYSQL. It turned out…
-
1
votes1
answer51
viewsFill in the name even if the name does not exist in the table
How can I replace the section below, so that the name of the activities of tbl_atividades_por_dep, even if the record does not exist in the tbl_atividades, the first select with distinct is what…
-
1
votes2
answers612
viewsMysql + Nodejs, SELECT Return Undefined
I’m trying to return the SELECT Mysql to make a listing, however, when I give a return for the function to return the result of the SELECT, the variable in which I saved this data gets the value…
-
1
votes1
answer225
viewsInheritance JPA Inheritance.JOINED does not work as it should
Hello, I have the following classes Person, Personal and Personal. The last two classes share the same primary key of the class Person, that is, the primary key and foreign key of the tables…
-
1
votes1
answer94
viewsSELECT command in MYSQL is duplicating a result (which is not duplicated in the database)
I’m doing a simple select to return a table in Excel, but when I run the command, some rows are being duplicated in the result. Follow the code below: SELECT distinct movimentacao.DATA,…
mysqlasked 4 years, 10 months ago Francisco Salome 79 -
1
votes2
answers112
viewsChanging table values using UPDATE CASE
hello, I have a table of this template: +-------------------------------+ | participacao | +----+--------+------+----------+ | id | nome | equipe | ativo | +----+--------+--------+--------+ | 1 |…
-
1
votes2
answers83
viewsselectOneMenu with convert does not work
I have a selectOneMenu where I am populating with the database data but the same is coming with the memory address (see image), and not the value I want. I tried to solve using the example of this…
-
1
votes1
answer136
viewsEntity Framework Core relationship creation one to Many
public class Evento { public int Id { get; set; } public string Nome { get; set; } public Categoria Categoria { get; set; } public CasaShow CasaShow { get; set; } public float QuantDeIngressos {…
-
1
votes0
answers20
viewsMysql search with jumps of hours/days/month
I would like to understand how I can do a search in mysql skipping a certain amount of days of each record, for example, show the records from the beginning of a table to the end by skipping from 7…
-
1
votes0
answers82
viewsMysql usage with Laravel and table items records are disappearing what might be?
I have a mysql 5.7.29 database called "base_default" with collation and encoding according to the image below and the api uses Laravel 5.6. on this basis I have the following table structure: data…
-
1
votes2
answers119
viewsMysql group by month and year between dates
I have a table called agenda in Mysql like this (the date is in the database in date format, I put in Portuguese format just to make it easier the example): I need a query that lists the months and…
mysqlasked 4 years, 9 months ago caiocafardo 1,897 -
1
votes1
answer321
viewsView mysql html data with Javascript
I have HTML data recorded in the database and I want to show it on the screen, but when I show this data instead of formatting it as html, the browser displays as text the tags and html code coming…
-
1
votes1
answer298
viewsHow to return the value of a query to the database in another javascript file?
I’m making an application where I need to query a database and return the value to another javascript file, only for some reason it’s not exporting anything to the other file when doing…
-
1
votes2
answers130
viewsPHP + Mysql --- Save data to BD
I’m doing a simple registration using Mysql(bd), PHP(checks and connection to bd) and HTML(page). When I click on my button to register (save data in the bd) it returns my own PHP code. I’m new to…
-
1
votes2
answers79
viewsMake two updates at once
I have a table with some records, I want to change two rows of this table at the same time I’m currently doing this: include("conexao.php"); $tabela1 = "endereco"; $endereco_id= "75";…
-
1
votes0
answers11
viewsHow to create parent and children by giving two or more columns as a grouping in any SELECT efficiently?
Let’s assume I have similar data below, but the complete table has: auto-increment, measurement values, dates, foreign keys, descriptive texts. In the example I created, it has only auto-increment,…
-
1
votes0
answers152
viewsHow to delete a table that has foreign keys in MYSQL Workbench?
I tried to use the DROP CASCADE and ALTER TABLE <nome_tabela> DROP FOREIGN KEY <chave_estrangeira>, DROP KEY <chave_estrangeira> to delete a table with foreign keys in MYSQL, but…
mysqlasked 4 years, 7 months ago user184985 -
1
votes0
answers15
viewsmysql query or php
??????????? <div class="aa-search-box"> <form action="" method="get"> <input type="text" name="cat" placeholder="Pesquisar aqui. Ex.: 'CA 5111"> <button…
-
1
votes1
answer148
viewsIs there a performance problem in using many foreign keys (FK)? If so, is it bad to have foreign attributes without being FK?
To clarify how much can be "many foreign keys", I will explain the context: In a system, I want to store by whom a certain record has been edited ( updatedBy) or raised (createdBy). This can happen…
-
1
votes1
answer221
viewsCOUNT function with criteria
How do I make this count meet some criteria? ALBERTO CONCLUÍDO | 8 REPROVADO | 3 DUPLICADO | 4 EM ANÁLISE| 5 I need you to return this result to the screen... where: The number represents how many…
-
1
votes1
answer118
viewsI’m having a stupid question, but it’s been a while and I don’t know how to solve it. (Mysql)
I was trying to create a table in mysql, simple, but it was giving an error. I decided to download an ide (Dbeaver), it kept giving error, so I downloaded Mysql Workbench and it does not generate…
-
1
votes1
answer245
viewsGroup data with Sequelize and My SQL
Talk young, everything jewels with you? I need a help that is the following, I want to make returns the data to groups as follows id_categoria1: [ { id: 1, nome: "Arquivo tramitação 1", arquivo_url:…
-
1
votes1
answer29
viewsQuery optimization
Hey there, guys! I have this query (Mysql) to count amount of visits on a Mê in a given period, however it takes more than 1 minute to run. How can I optimize it? Thanks in advance. SELECT…
-
1
votes1
answer45
viewsTIMESTAMP for EN MYSQL date/time
How do I return the Brazilian date in the database column so that it looks like this 29-04-2020 17:02:02, because he’s returning like this 2020-04-29 17:02:02. create database teste; use teste;…
mysqlasked 4 years, 7 months ago user187448 -
1
votes0
answers56
viewsSELECT Asynchronous with PYTHON
Hello everyone, thank you!! I am trying to make some connections to a Mysql database in asynchronous mode where there is dispute and print on the screen the result that arrives first... but I am not…
-
1
votes1
answer168
viewsError adding foreign key, how to proceed?
I am trying to reference the column id of a table in another table in my database, but I am told an error that is not very specific. The engine being used is Innodb and the database is in Mysql. It…
-
1
votes0
answers89
viewsHow to create editable text box over an image (e.g., as in Powerpoint)?
Hello, I’m developing a slide show like Power Point, only in the browser environment with Node.js (ejs, sequelize, etc.) I was able to create the inclusion part of the image and text by sending it…
-
1
votes1
answer364
viewsHow to receive multiple fields in php and insert in table(mysql), not knowing the amount
First question here, so if you need anything else, please let me know. I have a simple html screen that has a basic table and in this table there are inputs where put the values description and…
-
1
votes1
answer229
viewsSELECT with two Foreign key, return the two tables even looking for only one of the keys
I have a table that has two FK to reference the same table. By selecting all elements that have one of the two FK, using the query: SELECT "Proposta".id, "Proposta".id_segurado,…
-
1
votes1
answer70
viewsIs it possible to go through all the lines of a select, through some loop in the Mysql database?
I have an application that I developed a few years ago in a hurry, and then I started working to improve its performance. In this app, there is a part of the process that I perform several actions…
-
1
votes1
answer68
viewsHow to add a column in the database where its value is equal to the current year + the table id field?
I have a table called "users" in the database. See below the table structure: I would like to enter a field called "matricula" varchar (50) there after the "id" field. However I would like this…
mysqlasked 4 years, 6 months ago Gato de Schrödinger 2,367 -
1
votes1
answer702
viewsNodejs + Mysql + Return of Database Queries
Good afternoon! I’m having some problems with NODEJS using a Mysql database, I’ve made several attempts and I’m not sure how to solve this problem. My problem is that I would like to consume the…