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
-
0
votes1
answer498
viewsHow to return the result of a select with Prepared statement?
Guys, I’m not getting back the result of a search with Prepared statement. Here’s the code: public function search($obj) { $connection = new Connection(); $this->db = $connection->conectar();…
-
0
votes1
answer793
viewsI am unable to access Mysql from PHP
I have the following problem, I use Ubunto and installed mariadb, and when I try to access mysql with: mysql -u root The following error appears: ERROR 1698 (28000): Access denied for user…
-
0
votes1
answer31
viewsRename part of the parameter names of a precedent
I have some procedures where parameter names start with: "p_". It is possible to change in a unique way and via code all the names of all the procedures that start with this abbreviation by: "abc_"…
-
0
votes2
answers40
viewsSelect in two tables with Count
I have two tables in Mysql clientes id nome cat categorias id nome I need to create a SELECT, that shows all categories, but only categories that have more than 10 clients (for example). I wanted it…
-
0
votes1
answer25
viewsHow to decrease values in the database of another table, after performing an Insert
$sql = "INSERT INTO `saida` (`nomeProduto`, `quantidadeProduto`, `pa`, `setor`, `dataSaida`) VALUES ( '$nomeProduto', $quantidadeProduto, '$pa', '$setor', '$dataSaida')"; $inserir =…
-
0
votes1
answer52
viewshow to run an Insert query in a time interval with mysql
I need to run an Insert query every day at 23:59 with Mysql, without having to access the system INSERT INTO TB_ESTOQUE_DIARIA (ID_PRODUTO, ESTOQUE, DATA) SELECT ID, ESTOQUE_ATUAL,…
-
0
votes1
answer139
viewsError in the past
I created this procedure to test whether a field exists in a database, if it does not exist, the procedure would create. DELIMITER || CREATE PROCEDURE sp_verificarLinhas(IN colunas VARCHAR(50))…
-
0
votes1
answer1028
viewsSave array values to Mysql
I am trying unsuccessfully to record some information in my database, I have a table where the user will insert lines according to their need, but when sending the information to the database is…
-
0
votes0
answers47
viewsAbsurd difference in WHERE without BINARY conversion
I implemented an INDEX in the "Name" column, which is varchar Binary (latin1_binary). This query takes about 1.5 seconds to execute: SELECT Nome FROM contas WHERE IP='255.255.255.255' AND Nome !=…
-
0
votes1
answer27
viewsGROUP BY TIME type field in Mysql
In Mysql I have a table, one of the fields is of type TIME (TIME field). When making an appointment like this: SELECT hora FROM tabela GROUP BY hora Nothing is returned if I give GROUP BY in any…
mysqlasked 3 years, 7 months ago caiocafardo 1,897 -
0
votes0
answers1660
views1452 Cannot add or update a Child Row: a Foreign key Constraint fails
SQL Query: INSERT INTO tributos_prod (codigo, ncm, Descricao, preco, quantidade, v_total, situacao_trib_icms, origem_trib_icms, aliquota_icms, credito_icms, situacao_trib_pis, valor_base_pis,…
-
0
votes1
answer26
viewsCONCAT WITH ERROR
SELECT b.numero_contrato as name, CONCAT( sum(CASE WHEN a.status = 'Concluida' THEN 1 ELSE 0 END) AS concluidas, sum(CASE WHEN a.status = 'Recebida' THEN 1 ELSE 0 END) AS recebidas, sum(CASE WHEN…
-
0
votes0
answers106
viewsPHP take the value of a select and input whenever these are changed and query MYSQL
I have an input field that is a date that changes according to the date chosen in the calendar and 2 selects that are start and end time: <input type="text" value="13-08-2017" name="pickdate">…
-
0
votes0
answers30
viewsError using DELETE with INNER JOIN in MYSQL
DELETE tbl_grupo_id FROM gc_art_test.tbl_grupo_tbl_permission INNER JOIN gc_art_test.tbl_grupos ON tbl_grupo_tbl_permission.tbl_grupo_id = tbl_grupos.id WHERE tbl_grupo_tbl_permission.tbl_grupo_id =…
-
0
votes1
answer347
viewsHow to save records of a mysql query in C++
I’m using a C++ library that does the query in the database. My goal is to make a query, and save the data in a txt file, perhaps even manipulating to stay in json format. The problem is that I…
-
0
votes0
answers19
viewsJoin multiple PDO BINDPARAM checkboxes
I have a long form beyond the normal data, name, Evil and so on, I have 129 checkboxs, with a script that limits the choice of 3 checkboxs, and I want the 3 checkboxs chosen, are all inserted in the…
-
0
votes0
answers21
viewsI want to divide 0.01 cents by 4, the result is 0.0025 how to store in mysql?
I want to divide 0.01 cents by 4, the result is 0.0025, I want to store this value in mysql which dataype I use in column?
-
0
votes0
answers20
viewsFeed increase alone - php
I’m creating a forum and want to put x posts on it, but I want more posts to load when the user scrolls down to the bottom of the page (like twitter), does anyone know how I can do that? And I have…
-
0
votes0
answers16
viewsHow to get a response from an asynchronous call in JS?
Hi! I’m doing a query in a database. I need to display this query as soon as possible, and I am not knowing 'encapsulate' it with the await or whatever. The function is as follows: const…
-
0
votes3
answers978
viewsForm data is not being registered
I have a form written in php with connection to a database administered by phpMyAdmin. WHAT SHOULD HAPPEN: The data entered in the form should be registered showing a alert of "successfully saved"…
-
0
votes2
answers39
viewsShow data set with SELECT
Opa, then, I have a problem to find (show) some data that is being requested, I need to show the following data: https://i.stack.Imgur.com/ypczD.png and always appears the error that is an ambiguous…
-
0
votes1
answer3831
viewsI cannot log into phpmyadmin
Right now I’m studying shared file cloud services like Owncloud and Pydio. I am using Debian 9 as a machine. I installed xampp on it. I entered the phpmyadmin settings normally and went to put…
-
0
votes1
answer127
viewsHow do I resolve the error: Method getClientOrinalExtension does not exist, no upload de imagem com o Laravel 5.4?
Once again, I really need your help. You are giving me the following error when uploading the image to Laravel 5.4: Method getClientOrinalExtension does not exist. Next is my controller and view:…
-
0
votes1
answer567
viewsAjax and PHP Update
I’m having a problem editing the database values. My Script Code: $(function(){ $(document).on('click', '#salvar_pedido', function(e) { e.preventDefault; var id =…
-
0
votes0
answers31
viewsHow to show result of a modal search
I’m new to Frontend, I’d like to click on a button, show the user’s feedback in a modal. I already have the page showing the results, this working ok I would like to show now in a modal window to…
-
0
votes1
answer28
viewsCreate a select within another select to select the top ten values of each month
I’m trying to get the 10 best values of each month, I’ve looked for article here, but none helped me so far, I tried to do several subquery, but it was almost the same thing to take table 1 and…
-
0
votes0
answers46
viewsEmail search without domain
I’m doing a query to receive various data from BD, which includes entering the email field, but I don’t want to when doing searches to be shown emails because of the domain. For example, I have an…
-
0
votes1
answer257
viewsDatabase control (Mysql) in production environment
For a good part of my project I came working with git archive on a local server, (Debian 7), this week I migrated to gitlab, without any complication in the change, I changed only for portability,…
-
0
votes0
answers24
viewsFix with select using sum within case
I’m trying to use the code below: select case when((sum(valido) / sum(total) * 100) >= 60 then 60 else (sum(valido) / sum(total) * 100) end) i1 from tabela Syntax error near 'then 60 Else...'…
-
0
votes2
answers676
viewsHow to separate data from a GET request and insert into the mysql database with php
I have a form of questions with multiple questions, after the person answer has a save button that sends the answers and questions to the salva.php Follow the get (url): salva.php?…
-
0
votes0
answers20
viewsPHP connection error with Mysql via XAMPP
The xamp is active, but this message appears: Fatal error: Uncaught Error: Call to Undefined Function mysqli_connect() in C: wamp64T www projects feira_ita BD conexao.php:10 Stack trace: #0 C:…
-
0
votes2
answers516
views[Solved]Assign label value when selecting product in combobox
Good morning, I have this form where comboboxes already show the desired values: [! [Fromulary][1]][1] Now I have a problem, because I while selecting the product, I want it to appear on the label…
-
0
votes2
answers1665
viewsLimit Inner Join Result
I’ve been in trouble for a few days. I have a select that does some Inners and should return 3 lines, but one of the Inners has several results linked to the searched result; how to limit this Inner…
-
0
votes1
answer116
viewsconvert decimal and date to LOAD DATA INFILE
I am importing a CVS file into Mysql. I have two columns: a quantidade and the other as data. I am trying to convert to Mysql default. In the database this column is as decimal and date. You are…
-
0
votes2
answers98
viewsWhat’s wrong with this search form?
I created this search form, so it’s returning all blank! Here the form: <h3>O que você esta procurando? Digite aqui:</h3> <form class="form-inline" action="busca.php"…
-
0
votes1
answer49
viewsMysql event does not run at specified time
I created an event in mysql so that every day on time 00:05:00 Starting on 07/18/2021, it performs an update on a table, only it is not running at the given time, what might be happening? Follow the…
-
0
votes1
answer22
viewsMYSQL - Select with Data Column Formatted with Convert
I have the table(tbl) with the following field id, date date is a varchar field, which has dates in the following format: "dd/mm/yyyy" I want to make a SELECT, date shown in ANSI format…
-
0
votes0
answers15
viewsTrigger Count Insert and delete
I have a problem in a Rigger that I have here, I want this Rigger after counting and inserting in table x, it deletes the value he searched in table y, can make him count and insert but I’m not able…
-
0
votes0
answers40
viewsWhat is the function of the Unique Switch in foreign keys?
If the foreign key will always reference a primary key, which by definition is unique, then what is the need to define the Unique Constraint in foreign keys?
-
0
votes1
answer40
viewsError creating table Hibernate add ('type=Myisam') mysql
Hello, I am studying about Java web using Spring boot and Hibernate. but during an event project Hibernate is dropping an exception when running the server. if you need more information just ask.…
-
0
votes1
answer23
viewsDoubt to return a query
I have the following problem, in sql server I have a table of contracts and one of clients where returns as follows: In Where condition I need to pick up only the last created id of each customer’s…
-
0
votes0
answers17
viewsHow to import Mysql data in Xamarin Forms application?
Good morning! I have a dilemma here. I need to import data from a hosted Mysql database to my application in Xamarin.Forms and use it locally in Sqlite. Thus, the user would import the data from the…
-
0
votes0
answers7
viewsWhat is the maximum value of characters I can put in a MYSQL scan and text?
I’ve been watching some blogs that contain little more than 120 thousand characters and I was wondering if these characters are inserted in a MYSQL database, and I asked myself the question, what is…
mysqlasked 3 years, 3 months ago guilherme moreira 1 -
0
votes1
answer746
viewsStore JSON data in Mysql
I have a database in Mysql where, as the project is being developed, the number of fields of some tables has grown exponentially. The People table, for example, has fields relating to personal…
-
0
votes1
answer166
viewsCount in multiple tables
I have 3 tables I need a query that takes the name of the school, number of classes type A, Qtde of classes type B, Qtde of students who are in classes type A, and Qtde of students who are in…
-
0
votes0
answers14
viewsHow to declare a variable that will receive a Mysql Blob in PHP?
I am creating a method that will update some data, including an image that will be stored in longblob. The function declaration looks like this: public function uploadProjeto(string $tipo, string…
-
0
votes0
answers15
viewsFatal Error: Uncaught Error: Call to a Member Function bind_param() on bool
I am preparing the following method of uploading information: public function uploadProjeto(int $idCategoria, string $titulo, string $area, string $ano, string $endereco, string $descricao){…
-
0
votes0
answers12
viewsHow to set a Jtable with salaries from a table in the database that contains only payments
I am developing a system that manages customer payment and salary records. In the system database has the payments table, where is made the insert of customer payments. I need to make a salary…
-
0
votes1
answer1744
viewsButton to delete record
I have a page that shows the records made in a form. When a register needs to be deleted, I need to access phpMyAdmin, preventing anyone other than me from deleting the record. What I wanted: I…
-
0
votes2
answers60
viewsSave to the bank who edited profile
I’m developing a system that registers employees of companies. In this system I have the staff tables and users. Table employees have the data id|nome|empresa|data_cadastro|user_view|user_edit User…