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
votes2
answers89
viewsHow to search for the selected value in Mysql/PHP and HTML?
Good afternoon! How to make one SELECTreturn the result only to the value completed in the form HTML? For example, if someone fills in the TRIP field that returns all the values that contain the…
-
1
votes1
answer226
viewsHow to use the between command in codeigniter to generate report
I need to generate the following report: The user selects the time interval (start date and end date) and the revenue report is generated by displaying the value of the added recipes. Follow the…
-
1
votes2
answers198
viewsFilter in a Select MYSQL via PHP (Ionic 3)
Good afternoon to everyone, before explaining a little more about the doubt I would like to make it clear that I am very lay in the subject and, amazingly, I’ve been trying to solve this problem for…
-
1
votes1
answer2850
viewsmysql - using SUM()
I need to sum the total value of an order with more than 1 product included with different unit values. follow tb_request: id_pedido | id_produto | valor_unit | qtd…
mysqlasked 6 years, 4 months ago Maurício Sanches 487 -
1
votes1
answer79
viewsHelp in joining these two Mysql queries
I found the option UNION ALL but the results are shown one below of the other, I would like you to create a column for each discipline I have these two queries and I would like to put them together,…
mysqlasked 6 years, 4 months ago Miguel Silva 491 -
1
votes1
answer287
viewsReturn array within json
I have the following function in Laravel/QueryBuilder public function getEstudante(Request $request) { $estudante = DB::table('estudantes_identificacao')…
-
1
votes1
answer141
viewsError when listing MYSQL data via Restful API with PHP (Ionic 3)
Good morning, I have a problem listing data in Ionic 3 using mysql. The problem is this, I have an app that lists the comforts of a house and the consumption of each room, but I can’t find the…
-
1
votes1
answer45
viewsProblem with BD (foreign key)
My script is as follows. It is giving foreign key error and I cannot solve. CREATE DATABASE teste; USE teste; CREATE TABLE horario ( id_horario int PRIMARY KEY NOT NULL AUTO_INCREMENT, horario time…
-
1
votes1
answer109
viewsHow to make a condition with mysql php number
Hi I’m doing like a virtual bank in one part has to make the deposit, the user has the wallet money for example. I have 500 real in my wallet but if I put any value over 500 it deposits into the…
-
1
votes1
answer75
viewsCatch the hours of the day
I have the following select to pick up the hours of the day SELECT '00:00' AS A UNION SELECT '01:00' UNION SELECT '02:00' UNION SELECT '03:00' UNION SELECT '04:00' UNION SELECT '05:00' UNION SELECT…
-
1
votes1
answer104
viewscreate a select within while
I have this consultation: while($rows_cursos = mysqli_fetch_array($resultado_cursos)) { $tabela1 .= '<tr>'; $tabela1 .= '<td style="font-size:…
-
1
votes1
answer85
viewsValid working hours
How do I calculate the time spent on calls answered by an employee? However always within valid working hours, and knowing that the working hours of an employee is between 08hs and 18hs. For…
-
1
votes2
answers56
viewsdoubts about php authentication
When I take the test of login, I’m going to autenticar.php, but the screen is blank instead of directing to the main page. msql and php command tested and working) <script…
-
1
votes2
answers69
viewsSearch is not performed after connecting to the Java database
I’m trying to run a database search using java code, but I can’t. The database is connected, but the search is not performed. I created two classes, one that has the class with the connection…
-
1
votes1
answer81
viewsMysql - Inner Join runs on PHPADMIN but not on php SCRIPT
I have a small PHP script to interact with MAKERIOD. When I run select in PHPADMIN I get the return : "Showing 0 - 16 records (total 17, query took 8.0945 seconds.)" SELECT Tbdiario.cn1,…
-
1
votes1
answer173
viewsPHP MYSQL Query Bring Results from Today and This Week
I’m assembling type a CRM, where makes queries in MYSQL with PHP to bring the appointments I have today, this week and all others. I wish you’d bring something like that: Hoje: compromisso A…
-
1
votes1
answer96
viewsSelect where the month name appears?
At the moment I’m developing a app where I list on a table the month and the sum of consumption of each month in KW as shown in the print below: only that I n know how I would do to instead of…
-
1
votes1
answer541
viewsMysql trigger to be fired whenever a field is edited
Good colleagues, I have a problem I haven’t solved yet. I intend to create a Rigger that whenever the product quantity column undergoes an update it triggers an action to another table, to allow the…
-
1
votes0
answers61
viewsTurn database output to JSON in Amcharts default
I’m using the Code Igniter framework. I have the following model: public function getVendasVendedor() { $query = $this->db->query("SELECT * FROM vendas_vendedor"); return $query->result();…
-
1
votes2
answers199
viewsHow to insert grouped data from one table to another SQL
I have a 'point' table, with columns (id, Pis, date, time), which record the input and output of a product ('Pis'). I wanted to group in another table, where the data, Pis and date, are equal group…
-
1
votes2
answers267
viewsSQL helps to join 2 selects
I have 2 selects below, how can I join in only 1 select? I need to take everything that sold in a certain period (BETWEEN) by item only that at the same time I have to take what had stock of the…
-
1
votes0
answers57
viewsSeveral Updates from a select RAND
UPDATE `tabela` SET `Relacionar_A` = (SELECT `Relacionar_A` FROM `tabela` WHERE `Relacionar_A`='' ORDER BY RAND() LIMIT 2) I can do the update single, only 1 record from the select. What I would…
-
1
votes1
answer364
viewsInner Join with like, Mysql and Datatable
Speak people, I have a problem at the time of searching a field in the datatable, i have a table of contributors, this is linked with the contributors_param, contributors_end and contributors_tel.…
-
1
votes1
answer448
viewsprime numbers from 0 to 10 in mysql
Good afternoon, I’m having trouble with this Mysql question: Show the name of the animals and the breed code. Just show the animals that contain in their respective code a prime number from 0 to 10.…
-
1
votes1
answer1842
viewsInsert quote text in mysql database
I am using the following code to insert a quoted text into a mysql database: mysqli_query($con, "insert into medicacaohistorico (data, unidadeori, unidadedes, itemdetalhe, qtd, solicitante,…
-
1
votes1
answer25
viewsRestructure table by dividing columns into rows
I have a table in the following structure: | campo1 | campo2 | campo3 | campo4 | | --------------------------------- | | valor1 | valor2 | valor3 | valor4 | | valor5 | NULL | NULL | valor8 | Among…
mysqlasked 6 years, 3 months ago Costamilam 9,556 -
1
votes3
answers41
viewsDo not show element that has a certain value
In Mysql I have a table called user where all website users are stored: ID | NOME 1 | bla 2 | ble 3 | bli 4 | blo And a table called user_management, where are fields related to managing these…
mysqlasked 6 years, 3 months ago caiocafardo 1,897 -
1
votes1
answer182
viewsHow to cover this connection and code with DB for PDO with charset utf-8?
My question was not clear, I edited the title, it seemed only about UTF-8, but it is not, it is a connection and query conversion to PDO with UTF-8 <?php //export.php if(isset($_POST["export"]))…
-
1
votes0
answers718
viewsSpring+JPA, visible Transient field in View and not persistent?
Good evening guys, I have a filter that I do manually with @query() that in it I make a total calculating Join of a sale ie, SUM(valor * quantidade) as total At the end I’ll put the filter for…
-
1
votes2
answers55
viewsField with # does not appear in Mysql for _GET
Good folks, I don’t know where to put the question.. I’m sorry if I’m in the wrong area! Well, I’m racking my brain with a code on my page. The code works it sends the data to my database, only it…
-
1
votes3
answers737
viewsSave auto_increment id of a table to another table in the same file
I want the value of ID automatically generated in auto_increment in the table wpne_posts is saved in another table called wpne_postmeta The INSERT code of the first action is: mysqli_query($con,…
-
1
votes1
answer1146
viewsHow to return a value in a Mysql database
I have the following protocol: DELIMITER $$ CREATE PROCEDURE sp_CalculaVolume ( IN vReservatorioCodigo bigint, OUT Retorno decimal ) BEGIN Declare Formato int; Declare TipoReservatorio bigint;…
-
1
votes1
answer71
viewsTable header with Mysql query
doesn’t bring what I want, someone can tell me what I’m missing by looking at the code? <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />…
-
1
votes2
answers263
viewsProblem with Php and mysql - Simple login
Good night! I’m making a simple website, in which appears a user box and password that will be sent by form through the method post for the page valida.php. When comparing the user and password…
-
1
votes1
answer210
viewsSearch with multiple filters
I have this structure, how can I do so that I can have a select that gives me higher or lower price options? this script it only lists the data by category, I do not know how to implement so you…
-
1
votes1
answer48
views"NOT IN" behavior affecting NULL column display
I have a table where I record purchases made by the site. I use a field called status_plataforma to receive the status of the Paypal transaction. This field, besides being able to receive an…
mysqlasked 6 years, 3 months ago Wallace Maxters 102,340 -
1
votes1
answer77
viewsDate Picker Jquery display in d/m/Y format and write to database Y-m-d format
I am using this datepicker in my project, already this configured as you can see below the Dateformat in d/m/Y format, more like when I went to save in the bank it would convert to Y-m-d format, how…
-
1
votes1
answer1126
viewsNode.js: How to extract database information and display in HTML pages
I have learned how to fetch information from Mysql database, but I cannot manipulate this data to expose in HTML pages. The code I’m going to expose underneath I got from w3school: var mysql =…
-
1
votes1
answer252
viewsSplit query result into columns
I have a select that brings items with prices, as I do to divide the result into two columns: Examples: I hope to leave it this way: Follow my code: <html> <head> <meta…
-
1
votes0
answers45
viewsSQL query in PHP
I want to run this sql1 and if it does not return me any results I run sql2 and present it, but so it is not working, when sql1 returns result it presents right, but when there is no result, it is…
-
1
votes0
answers369
viewsHow do I limit pages in the EX pagination: 1,2,3,4.... , do not leave all numbers in view from 1 to 50
<?php include_once("conexao.php"); $pagina = (isset($_GET['pagina']))? $_GET['pagina'] : 1; $result_curso = "SELECT * FROM cursos"; $resultado_curso =…
-
1
votes1
answer1135
viewsPrint Mysql Table data in PHP
I have the following code: <?php //iniciando a conexão com o banco de dados include_once("conectar.php"); if (!$strcon) { die('Não foi possível conectar ao Banco de Dados'); } $sql =…
-
1
votes1
answer38
viewsDifferent results with the same SQL statement
Talk programmers(as), quiet? I’ve done a lot of research not to repeat questions here, but I really don’t understand why the SQL statement works on Mysql Workbench and the Java/JDBC SQL string…
-
1
votes1
answer42
viewsmysqli num_rows expects Parameter 1 to be mysqli_result
Hello, I’m a beginner in PHP and Mysql and I’m in need of help. I am getting the error that is in the question title in my login function: public function login ($login, $senha) { $result =…
-
1
votes1
answer1238
viewsJPA error with Mysql 8
Hello, After updating my database, my application has been presenting exceptions, like java.sql.Sqlsyntaxerrorexception. The class below is the one he complains about, saying it doesn’t exist when…
-
1
votes1
answer32
viewsRegistering new date in Mysql
When I first register the item in the database it takes the date it was created and saved in the database, the problem happens when I edit the item in the program and then saved in the database it…
-
1
votes1
answer87
viewsSQL statement in Mysql with KURDATE(), does not display API result with PHP
In this SQL what is wrong? SELECT top.id_topatletas, top.idusuarios, top.posicao, top.workout, top.data_inicio, top.data_fim, user.idusuarios, user.nome FROM top_atletas top INNER JOIN usuarios user…
-
1
votes1
answer297
viewsCodeigniter 3.1.9 - Database connection
I am developing a web application using version 3.1.9 of Codeigniter, but I’m having difficulties connecting to the database. Follows configuration: $active_group = 'default'; $query_builder = TRUE;…
-
1
votes1
answer114
viewsExport password protected csv from a DB
It is possible to generate a file CSV protegido por Senha from a banco MySql using PHP? the password is to open the file in the client. I use this PHP script to generate the CSV file: <?php…
-
1
votes1
answer115
views