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
answers146
viewsDoctrine Inflector error while saving files in the database with Tinker
The error happens when trying to save the updates in the database, when I give the command $contact->save(); it returns me the error: PHP Deprecated: The "Doctrine Common Inflector…
-
1
votes3
answers71
viewsHow to work with files and database in a way that is possible to consist
In a system where one works with file uploads being necessary to consist the links of these files in the database, which is the best approach to do it? Example: A registration system where it is…
-
1
votes1
answer35
viewsShow date in different rows but grouped services GROUP BY
Good afternoon, I am making a select where I have to show the amounts of services and name of the grouped clients, only that the different dates have to create the line with grouped services and…
-
1
votes0
answers104
viewsOperand should contain 1 column(s)
I’m having a problem with a query, it’s a college job, a Dataware House creation. Well, I need to enter in my main table (f_contract), some information, the same are in other tables and I need to…
mysqlasked 4 years, 5 months ago Gustavo Silva Martins 11 -
1
votes1
answer43
viewsMysql - A single entity (N:N)
Good morning guys. I’m new to database and I’m trying to understand some concepts: A single entity (N:N) A company works with projects in a horizontal way, where the person N in a project can be the…
-
1
votes1
answer73
viewsSUM() in a clause Where - Mysql
The query below brings results of a contract, whose contract delay is between 1 and 487 days. Now I want somar the values of faturas pertencentes to the contract invoice.value and then filtrar for…
mysqlasked 4 years, 5 months ago Wagner Fillio 1,328 -
1
votes0
answers97
viewsCheck Dynamic Checkbox (Checkbox) from a while inside the database
Guys, I’m banging my head here with this... I have two tables in the bank, one corresponds to the department and another corresponds to the checkbox registered for that department, the problem is,…
-
1
votes1
answer76
viewsShow only users with the same Administrator id on the page
Good person, I have a page where shows all registered clerks as shows this image(https://prnt.sc/t972jm). In the "Unit" column of my bank it shows the unit that the clerk works. I have two units in…
-
1
votes1
answer38
viewsMysql - merge queries into different tables
Hello I have the following commands: SELECT CASE Extract(month FROM data_cadastro) WHEN 1 THEN 'Janeiro' WHEN 2 THEN 'Fevereiro' WHEN 3 THEN 'Março' WHEN 4 THEN 'Abril' WHEN 5 THEN 'Maio' WHEN 6…
-
1
votes2
answers86
viewsConsult the last 3 days in which there was record in the table
I have a table called OperacoesCaixa and in it I have the following fields: Cod, Valor, DataOp Well I need to make one select that I return the releases of the last 3 days, but I do not want to…
-
1
votes1
answer24
viewsHow to use 2 lists to change Mysql via Python 3.x, in this case
Good guys, all right? I am creating a script in Py by COLAB itself because I need to change the weight of various products in Woocommerce, I capture the ID of a product group based on size 300ml,…
-
1
votes2
answers32
viewsQuery that returns sum where states are equal to X and other clusters
I have a table where contains the sale value of some states of Brazil, I would like to perform a query that returns me the sale value of the states of SP and RJ, and for the other states he returns…
-
1
votes2
answers106
viewsSQL search between two tables with duplicate result
I have a View and a table. A View V_CUSTOMER with customer data, but does not have the same CPF/CNPJ as in the view, which is identified by the field V_CUSTOMER.CUSTOMER_ID that makes the…
-
1
votes1
answer58
viewsHow to perform the calculation of updating a product’s stock in a table within the PHP code of another table?
My table itens_venda performs two calculations within a PHP code: The first calculation multiplies the price with the quantity of the product in the table itens_venda (That part is OK). The 2nd…
-
1
votes2
answers120
viewsMysql - Select - how to group two different values into a single value
I would like help on a subject. I have a query that lists requests(orders), and each request has its status, for example: 'confirmed', 'refused' and 'unmarked', I would like to create a Select that…
-
1
votes2
answers112
viewsAccented character problem (ADODB + Mysql + PHP)
Hello guys :D I’m going through a problem developing a project where I can’t put accented characters. I am using to make the connection to the Mysql database, Adodb in version 5.20.14. I have a main…
-
1
votes0
answers31
viewsQuery amount of storage consumed by a User
Good morning, I’m having trouble checking the amount of disk a person consumed. This was the query built, seeing several sites: SELECT table_name AS 'Nome da tabela', ROUND(((data_length +…
-
1
votes0
answers46
viewsReduce and simplify redundant sql (mysql) query for financial reporting (account hierarchy)
I have basic knowledge of database and Mysql, I wonder if someone could help me decrease the 'size' of a query and its redundancy (facilitating future maintenance). This is a financial report with a…
-
1
votes1
answer115
viewsIt is recommended to use the JSON type in the columns in the table below
I am learning relational databases, so I decided to create a school administration system, I made a table only to keep all the student’s school history (all the newsletters with other information).…
-
1
votes1
answer32
viewsGroup mysql results
Good evening, I need to make a query in the table below: But bring me the result of how many type = E , type = S grouped by month, this result I will play in a chart that will display by month how…
-
1
votes1
answer39
viewsCatch the lowest and highest value of a category with the count and ID
I need some help to make a SELECT that returns me the highest and lowest value of a category with its respective IDs and the amount of each category. The algorithm is complex, because it needs to…
-
1
votes2
answers215
viewsHow to map class fields with names other than database columns?
I’m using IDE Intellij. I have the following model: @Entity(name = "carro") @Data public class Carro { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String nome;…
-
1
votes1
answer46
viewsDo not list duplicate data
I have two tables, videos and exercicios, where I would like the data that is in the two not to be listed, that is, if the foreign key is in the other table, the data should not be shown in the…
mysqlasked 4 years, 1 month ago caique santos 21 -
1
votes0
answers95
viewsScript for creating tables in mysql using Python
I intend to create a script to create tables in mysql using Python 3 to register users, each table will have the name of the person’s CPF, however there is an error syntax (1064) I couldn’t…
-
1
votes0
answers118
viewsI cannot install Mysql, proble with MYSQL CONNECTOR NET 8.0.17
I had mysql on my computer working perfectly a while ago on version 8.0.17, I did the uninstallation months ago and today I had to install again, the latest version is on 8.0.22, when I tried to…
-
1
votes2
answers68
viewsWhat to use to store status in a database?
I am creating a database in Mysql and in it there will be a table to do point control: when the employee started working hours, when closed, when stopped for lunch and etc. I’ve been making a…
-
1
votes0
answers42
viewsSql - How to make a name or surname unique
Guys, the following is a table called sqlite, and I want the following I don’t want data to repeat, but if someone with a name and surname is registered, I want a person with the same name to be…
-
1
votes0
answers26
viewsDisplay sequelize related table result
Good would like the help of you gentlemen, I have two tables customer and product a customer may have several products and one product belongs to only one customer, I have a relationship using…
-
1
votes0
answers45
viewsForm of insertion into accordion in multiple items with AJAX
Hi, I’m trying to make a requisition for updating item of accordion in the mysql, but only one item is updated. The code works as follows: Sample of Code 1, creates the cards within the modal. Each…
-
1
votes1
answer41
viewsDatabase return in asynchronous function with await
I have an asynchronous function that I need to use await in the return of the database to use this data later when doing the next insertion using the LAST_USER_ID() MYSQL, however, using the await…
-
1
votes1
answer28
viewsError when displaying contents of a mysql BD via a PHP API
When creating an API for later consumption I get this error: Fatal error: Uncaught Error: Call to a Member Function prepare() on string in C: wamp64 www React test with API full src api…
-
1
votes1
answer59
viewsWhen I run my SQL function it returns NULL, even with data entered in the database
I created an SQL function to calculate the user’s daily calories by multiplying their baseline metabolic rate by the level of physical activity. Workbench shows no error when implementing my…
-
1
votes1
answer43
viewsHow to View Query with Inner Join in mysql php
I have these two tables and would like to consult the owners according to the type of properties that has the id_proprietario. what I tried to do was this: select * from proprietario inner join…
-
1
votes1
answer77
viewsUpdate class data with Array in Laravel
I have to update several records in mysql database via ajax in Laravel. There is a list of many teachers with many subjects, however they are part of a class in specific. If anyone can help me very…
-
1
votes1
answer29
viewsHow to make a select and a "Sub Select" faster (in PHP)
I am facing problems with query for counting records. I have a table of clients (separated by owners and family members). And I need to count the records by status, but the status of the family will…
-
1
votes0
answers21
viewsAdd column values created in PIVOT
Well, in this query I have to list the products that went out for consumption in a certain period, and how much was consumed of each product. I have the Cód of the product, name, date of movement,…
-
1
votes1
answer106
viewsseparate records from field with point and comma separated values in Mysql
I have two tables in mysql database, GROUPS table and PRODUCTS table. GROUPS +-----------------+ | grupoid | +-----------------+ | 1 | | 2 | | 3 | +-----------------+ PRODUCTS +-----------------+ |…
-
1
votes1
answer33
viewsPerform a query by checking if this record already exists in another table
The logic is as follows, I have a table "TBL_NOTICIAS" and another table with name "TBL_DESBLOQUEADO". When the user accesses the page I present all the news and he can unlock the news you want to…
-
1
votes0
answers56
viewsMysql generating error creating Foreign key: Error Code: 1215 Cannot add Foreign key Constraint
mysql is returning this error to me every time I try to add Foreign key to these tables, but I already checked the types of both fields and everything is the same. The table where I have the primary…
-
1
votes0
answers35
viewsCopy tables to another bank while maintaining relationships
I’m trying to send some records from one bank (bank A) to another (bank B) that contains the same structure. They are records of 3 tables, 1 table(patient) contains MAIN records and the other 2(file…
-
1
votes1
answer21
viewsLaravel: Display Row() instead of result()
I’m wearing the Laravel 7.3. I have the following appointment: $data = DB::table(self::TABLE_CATEGORIES) ->select('id') ->where('slug', $slug) ->get(); And the result would be this:…
-
1
votes0
answers50
viewsarray does not work when creating Polyline leaflet
Someone could help me, I’m having difficulty extracting latitude and longitude from a PHP array and adding leaflet (Javascript) to the map. Coordinates are correct with print but only one location…
-
1
votes3
answers55
viewsRecord form value and add to the database value
I have a question, how do I add the entered value of the form to the data that is recorded inside the database? The structure is more or less this. In the form action it takes me to the alterphp…
-
1
votes0
answers27
viewsDuplicate entry '78161' for key 'PRIMARY' (Not duplicated)
I have a table that stores people’s data and when I give an input to add a new record it says that the 'id' (primary key) is duplicated, however it is not duplicated. The table where I am entering…
-
1
votes1
answer53
viewsMYSQL search in fields with equal names
Hello, I need to do a search in mysql in which I use several Internet joins, and because it is many relationships for many, some of the fields relate to one more field of the other table, follows an…
-
1
votes0
answers172
viewsSyntax error or access Violation: 1066 Not Unique table/alias with polymorphic relationship in Laravel
I’ve been racking my brain for weeks and I can’t solve this problem. I’m using this package https://github.com/rappasoft/laravel-livewire-tables to use Datables in Laravel with Livewire. I have…
-
1
votes0
answers48
viewsPass page via $_GET and manipulating the URL via . htacess
I have a page in PHP that shows the products in general (products.php): <?php include_once("conexao.php"); $query = "SELECT * FROM produtos"; $result_query = mysqli_query($conn, $query); ?>…
-
1
votes0
answers24
viewsProblem: User-friendly URL on . htacess modifying the Index
As I explained in the post: /questions/491299/passar-p%C3%a1gina-via-get-e-manipulating-a-url-via-htacess I have a structure of pages: 1-Index 2-Product 3-Detail (of products) The 'Product' page is…
-
1
votes0
answers60
viewsHow to include words without accent in search results - PHP, Mariadb
Please, I need a little bit of your wisdom and patience. I’m developing a website, which has a search page, and I need to make the results presented "Accent insensitives". That is, if the person…
-
1
votes1
answer25
viewssend only completed PHP ARRAY data
Good night, you guys! table is already almost ready only need take the value that is selected in the quantity field is less than 0 not send to the database so send the value that I put in the field…