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
answer48
viewsHow to make several separate selects with the 4.2 Standard?
Hello I need to make a select on a table, however if I do not receive the month by the parameter I must do the SUM method to sum all months if($month != 0){ $dbRegister =…
-
0
votes1
answer883
viewsCheck if foreign key is being used
I have 2 tables: Functionary idFunctioning Name Addressee profession Professional idProfissao officiating Being that the profession of the working table is a foreign key of idProfissão of the…
-
0
votes3
answers1227
viewsTake the id of a database list, and use in another page to insert phones in PHP
Hello guys I’m doing a test, and I have the data in a table in my index page in HTML and I intend to click a button in front of some data and then forward me to another page that will show the name…
-
0
votes1
answer400
viewsUpload PHP and Mysql image array
I have the following code: <?php if(isset($_FILES['files'])){ $errors = array(); foreach ($_FILES['files']['tmp_name'] as $key => $tmp_name){ $file_name = $key.$_FILES['files']['name'][$key];…
-
0
votes1
answer57
viewsError in Query Mysql
I have a php page that needs to do a query in 3 fields in Mysql Database. Campo Aprovado Campo Reprovado Campo Resolution $select = mysql_query("select * from denuncia where (resolution is NOT NULL)…
-
0
votes1
answer270
viewsProblem with select UNION ALL mysql
Galera mounted the following select in MYSQL: SELECT id_produto, SUM(qtd) as qtd FROM ( SELECT id, id_produto, qtd FROM produtos_pedidos WHERE id_pedido = '1' UNION ALL SELECT id, id_produto, qtd…
mysqlasked 8 years, 2 months ago Hugo Borges 5,294 -
0
votes0
answers35
viewsError importing records from database to chart
In my old system I had a hightcharts chart that imports the record values of my database table, however, when using the same model in another system, the following error started to appear: Notice:…
-
0
votes0
answers304
viewsDuplicate values in column that is foreign key
When trying to insert a new data into a given table (employee), I have a column called "manager ID" which is FK from the table itself "employee". During the registration I send the ID of another…
-
0
votes1
answer159
viewsWork with multiple or single database (Mysql)
Hello, Guys! A company hired me to unify (and remake) several systems they own. The job is to create single administrative panel for various sectors and products. When thinking about data storage, I…
-
0
votes1
answer228
viewsPHP/Mysql - Print values with relation between tables
In a system I need to print paint cans and each one has its own colors. I did it in a way that works, but repeats several times the requests in the database. I made two tables(Example): latas…
-
0
votes1
answer161
viewsInclude data in Json beyond what comes via Mysql
I am building an API in PHP/Mysql that will feed a hybrid APP, also under construction, via Ionic. Data transit is via Json. I guess I’m new to Ionic, Angular, JS, and Json... Reasonable in PHP and…
-
0
votes0
answers149
viewsMysql > query with dynamic columns
Friends I have a question.... I have the following tables in Mysql: alunos (id, nome, etc) turmas (id, turma, etc) matricula (id, turmaID, alunoID) disciplinas (id, turmaID) avaliacoes (id,…
-
0
votes2
answers74
views -
0
votes3
answers860
viewsmake a select by grouping by year
I have a client field on it I need to make a Count of how many customers were registered during the years 2016, 2017 and 2018 i was making 3 select, being that in each one I was making a Where…
-
0
votes1
answer483
viewsThis web container has not yet been Started
My Java Web application, using Hibernate, published on a Glassfish server and using Mysql database published on Hostgator this causing, constantly the following error: [2018-01-31T11:51:15.852-0200]…
-
0
votes1
answer878
viewsDelete SQL record with dependency
Good afternoon. I wonder how to delete records from a table containing foreign key. I would not like to delete the children records (to keep the history). I always get a message warning that there…
-
0
votes1
answer1894
viewsUsing Function within Select
I have a select, within it I have a function : SELECT VAL1, VAL2, ".funcao('VAL1', 'VAL2')." AS soma FROM Conta WHERE soma < 100 Table structure CONTA -------------------- | ID | VAL1 | VAL2 |…
-
0
votes1
answer253
viewsWaiting for table level lock Mysql Java application error
I have a Java swing application that uses the Mysql database, in its operation after spending some time in operation I realized that the application hangs in a few moments, It is necessary to…
-
0
votes0
answers26
viewsWarning: mysqli_select_db() expects Exactly 2 Parameters (did not find answer in the other topics)
I’m new to this programming business so I’m kind of stuck in this code, so I’d appreciate it if someone could help me. The following warning appears: Warning: mysqli_select_db() expects Exactly 2…
-
0
votes1
answer50
viewsDoubt with the LIKE query
I developed a function that searches the bank for a client by ID: function buscaId ($id,$conexao){ $resultados= array(); $query= "select * from cliente where id like '$id%' "; $resultado=…
-
0
votes1
answer275
viewsMysql query with last 30 day results showing totals per day
I have a query where you get results from the last few days, I need the results to be shown per day, I used the group by , but it hasn’t worked yet, as you can see below. resultado esperado:…
mysqlasked 8 years, 2 months ago Chefe Druida 1,086 -
0
votes1
answer89
viewsRecover field without include/require
I have a report created in mPDF that performs a select through the following function that is found on the page "registra_pessoa.php": include_once("registra_pessoa.php"); $pessoas =…
-
0
votes0
answers62
viewsRecover variable via ajax requests
I have the following fields: <div class="container"> <div class="form-group"> <label for="nomefiltrar" style="color:#E4CDAC; font-size: 17px; font- family:Arial">Nome</label>…
-
0
votes0
answers25
viewsExport Mysql database settings
I recently exported a database mysql in format .sql, however some settings are not present, such as the configuration for FULLTEXT index. What is the correct procedure to export these configuration…
-
0
votes1
answer87
views -
0
votes1
answer41
viewsView mysql query results in Master/Detail
I have the following result of a consultation: CATEGORIA | SUB cateroria1 - sub1 categoria1 - sub2 categoria1 - sub3 categoria2 - sub1 categoria2 - sub2 categoria3 - sub1 How do I echo to display…
-
0
votes1
answer2255
viewsHow to select two tables in mysql?
I know this must be an easy question, but I’m a beginner: I have these 3 tables in my bank: In this case, the purchased table is where the user’s Cpf is stored that acquired the course and saves the…
-
0
votes1
answer165
viewsDoubt to get the id of a different Php and Mysql table
How do I save the id of a different table within a select ? Code below <div class="medium"> <span> <select name="turma"> <option>Selecione a Sala</option> <?php do {…
-
0
votes0
answers105
viewsColumn Count error doesn’t match value Count at Row 1, for a select
My system, in the save button, I inserted 3 tables at the same time, being that 2 uses FK, I am using the field cad_id as FK in 2 tables, I am making a select to take in the bank a single field…
-
0
votes1
answer31
viewsUnexpected Result in SELECT
I have a SELECT that does Join in three tables, taking order data, requested client, responsible assistant and values related to orders. all the Clientes and Assistentes duplicates in that query are…
-
0
votes1
answer2696
viewsBackend with mysql database and frontend in javascript(React-Native)
I am developing an application in javascript(for android)e I would like to use mysql as database for this application, however I could not use mysql in the same code so I did some searches that…
-
0
votes2
answers630
viewsAllow multiple requests from the same PHP user
Hello, I am working on a legacy system developed with PHP. This system acts as a single-page application using jquery.ajax to load the pages the user requests, each page requested from the system is…
-
0
votes1
answer666
viewsHow to create a dynamic query in php
Hello I would like your help , I am creating a form with php and mysql , in this form has the request screen , type has the fields to be filled with the month and name , on the hill has the month…
-
0
votes2
answers35
viewsQuery returning divergent result
I have two tables: Table accounts with column value with two records totaling 1100; Table receipts with column value with a record totaling 500 I want to perform a query where I receive the sum of…
-
0
votes1
answer21
viewsReturn date quantity in Mysql
I have the table containing the date field. | Data| | 2016-06-09 | | 2016-06-09 | | 2016-06-09 | | 2016-06-08 | | 2016-06-08 | | 2016-06-05 | | 2016-06-01 | I want you to come back more or less like…
mysqlasked 6 years, 9 months ago Geraldão de Rívia 940 -
0
votes2
answers144
viewsDoes not insert with empty date input
In my form I have this field: <h5><strong>Data da Visita</strong></h5></h5> <input type="date" id="DataVisita" name="DataVisita" /> But if you run out of date,…
-
0
votes1
answer50
viewsHelp for designing mysql query
I have the following table in Mysql: Cod,D1,D2,D3,D4,D5,D6,D7,D8,D9,D10,D11,D12,D13,D14,D15 D1...D15 fields are filled with values between 1 and 25 in each record. There is no repetition of values…
-
0
votes0
answers766
viewsTrigger to update a field automatically after Insert
I have a user table, basically: CREATE TABLE IF NOT EXISTS `sistema`.`user` ( `id_user` INT NOT NULL AUTO_INCREMENT COMMENT '', `hashed_id` VARCHAR(40) NOT NULL COMMENT '', `nome` VARCHAR(40) NOT…
-
0
votes1
answer193
viewsGoogle charts returning empty php mysql
I’m creating a Chart with php mysql, but the same is not returning anything on the screen. Queries are working normally in mysql. <script type="text/javascript"…
-
0
votes1
answer57
viewsHow to Insert an indeterminate amount of users into an SQL Database?
Hello guys I am beginner in PHP and SQL, I need to make a kind of form that the person informs how many people want to register, anyone have any idea? I can only do this with a fixed amount of…
-
0
votes1
answer37
viewsIs it possible to display the data of a table separately?
I have a table in my database and it contains a column with the following data: link.com/1, link.com/2, link.com/3, link.com/4 What I would like to know is if there is a way I can query in PHP and…
-
0
votes0
answers83
viewsOptimize highchart chart chart
They asked me to add in my system a chart to compare 47 services and I opted for the highchart, however, in addition to the graph not working is with more than 5,000 lines of code, I need to reduce…
-
0
votes2
answers121
viewsPassword renewal system
My point is that I’m trying to make a password reset system. [ Current password ] [ New password ] [ Swap ] Good codes below Settings.php <?php require_once('assets/system/core.php'); if…
-
0
votes1
answer137
viewsSynchronization of Phpmyadmin tables
I needed help in PHP My Admin on synchronizing fields in different tables and in the same database. For example: Database: Data Base Test Table test1 columns: - col1 - col2 Table test2 columns: -…
-
0
votes1
answer324
viewsHttpurlconnection - Use php to connect to Mysql
I am trying to fetch the data of a user saved in an external database to log in/register. However I run the system and there is no Exception, but it does not connect. I tested the php that I am…
-
0
votes1
answer244
viewsSelect with MD5 password returning empty
I am using the query below to perform the login,it was working normal with normal passwords,more now I am migrating to the password Md5,only this giving only invalid password,I believe it is my…
-
0
votes1
answer318
viewsI can’t change my column collate in mysql to utf8_general_ci
Good morning Personal. I have a problem with changing the collate of a column in my database. An example of how I am running: ALTER TABLE `minhaTabela` CHANGE COLUMN `nome` `nome` VARCHAR(50) NULL…
-
0
votes1
answer146
viewsDatastudio does not connect with Mysql restricted user
I created a new Mysql user with restricted permissions for only one VIEW. (GRANT ALL ON database.view TO'user@'localhost') When I try to connect with this user in Datastudio I get denied access…
-
0
votes1
answer104
viewsHow to create a loop between the records and the current php date
I have the following Chart combo: <div id="vendas_diarias" style="height: 500px;"></div> <script type="text/javascript"…
-
0
votes1
answer105
viewsHow do I handle Variables in PHP?
I have the following code in PHP: Array: $eqCodigos = $_POST["eqCodigo"]; Treatment Attempt to save to Mysql $eqCodigo1 = explode("\n", $eqCodigos); $eqCodigo2 = array_filter($eqCodigo1); $eqCodigo…