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
votes0
answers61
viewsSQL with SELECT and SUBSELECT to mount a chat
Hello guys from Stackoverflow, I’m mounting the SQL below to mount a chat service user, which brings the list of all active conversations, but I’m having a problem, my SQL is bringing the latest…
-
0
votes0
answers51
viewsMysql insertion problem
I have a form Scheduling and one of Employee Register, one script to enter data in the database table Scheduling and another script for the Register. In the Scheduling I need to rescue the code…
-
0
votes1
answer27
viewsProblem to list database data
I’m having trouble storing the values of ORDER BY in php, I would like to store them in an array and show it on another page. Database file with function: function buscar_rank($conexao) { $sqlBusca…
-
0
votes1
answer680
viewsHow to check if it already exists in the database and update
Well, I’m trying to update and check if what I’m updating already exists, I can check if it exists, but there’s a problem, as I’m updating a data, it will always exist, if I take the function that…
-
0
votes1
answer521
viewsPHP error when connecting to Mysql database
Although I haven’t changed at all the settings of my Mysql database that has been working well for months, the connection has stopped working. This is the PHP command I use to make the connection:…
-
0
votes1
answer65
viewsClauses wherein and whereNotIn
I have two tables, one has the disciplines and the other has the periodo_disciplines, I filter the course and the period. I need to bring only the disciplines that are not launched in the table of…
-
0
votes1
answer222
viewsERROR Parse error: syntax error, Unexpected '<'
this error appears in my code: Parse error: syntax error, Unexpected '<' in /home/Storage/3/da/ca/public_html/Viewrevisao.php on line 110 What would be the solution in this case <?php…
-
0
votes2
answers833
viewsReturn search data to database in Jtable
I’m developing an interface that should return in a JTable values of a mysql table. I have developed the following method: public class Teste extends javax.swing.JFrame { private JTable table;…
-
0
votes1
answer126
viewsOnetomany or Manytoone?
Good evening, I have some basic beginner questions I need to create a timeline that has the following: What events occurred in a certain range of dates, who was born and who died in this range? I…
-
0
votes1
answer101
viewsPlace page numbers in PHP paging with MYSQL
How could I put page numbers in this paging script with PHP and Mysql? The way it looks: First Prev 1 2 3 4 5 6 7 8 9 Next Last <?php if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; }…
-
0
votes0
answers47
viewsInsertion and removal using PDO in Onetomany and Manytomany relationships
I beginner questions about inserting and removing using PDO in such relationships Onetomany and Manytomany. Example: class Livro{ private $id; private $titulo; private $generos; //Livro tem mais de…
-
0
votes0
answers374
viewsGenerate a PDF and write data to the database in the same form
I have a program that takes the name and email of the client to register in the bank and generate a pdf with this data. But I can’t send the registration data to the file that generates the pdf.…
-
0
votes2
answers73
viewsHow do I make sure I can’t book the same Equipment for the same day and time?
I’m making a code for Equipment Rental in Php, in general the code is almost all finished, but in the last step I came across a big problem, I wish Adm, because it is he who makes the reservations,…
-
0
votes1
answer69
viewsNo matter the products for the PHP cart || MYSQL
I’m making an online store and I’m having trouble making the cart, when I click on the icon to add to cart, it doesn’t matter and the cart always appears empty. And the result: This is the button…
-
0
votes1
answer61
viewsHow to improve this sql code?
I would like to improve this code so that it does not repeat the same code in both Ifs. I don’t feel like using procedures because I don’t see the need. DECLARE @Ordem VARCHAR (7), @Valor…
-
0
votes1
answer330
viewsWarning: Illegal string offset 'id_mol_comp' in
I’m making multiple mistakes Warning: Illegal string offset 'id_mol_comp' in C: wamp www fanamol carrinho.php on line 167 Notice: Uninitialized string offset: 0 in C: wamp www fanamol carrinho.php…
-
0
votes1
answer592
viewsCheck if a username already exists in the angular 2+ php database
I need to check if a user already exists before registering. I have the following methods: Register.component.ts: import { AlertService } from './../alert.service'; import { Component, OnInit } from…
-
0
votes1
answer830
viewsHow to make SQL query using like comparator and various values out of order
I looked for answers here in the community, but I couldn’t find anything specific. I have a page where I can search the name of previously registered clients in a Mysql database. Currently, I am…
-
0
votes1
answer45
viewsError - Select with SUM
Expensive; I have a table with several information, among them a field with value_boleto and another with maturity. It needed first to be ordered the compo due with the current month (current) and…
-
0
votes1
answer152
viewstake variable data from input
Speak People! I have a system that registers products and creates what I need in the data field, but in a crucial part, after I create the fields I need it generates input with these fields! the…
-
0
votes2
answers167
viewsWhat’s wrong with this mysql data entry code?
I’m trying to make a code to enter data into the database localhost, but I’m having trouble inserting, and I don’t know why. My database settings are correct and the tables are correct. The error is…
-
0
votes0
answers68
viewsArray sent via Json for Javascript comes null on it
I have an application where, a Javascript I have a function that performs an Ajax call to the file . php handle. The . php handles the function buscaConta(p) like: makes a SELECT in the Mysql…
-
0
votes1
answer1151
viewsAdd up final total value using group by Mysql?
I have the Sales table and the seller table and I would like to know the % of sales of each seller. table vendor Id | Vendedor | 1 | Fulano | 2 | Beltrano | table request Id | Id_Vendedor | Valor |…
-
0
votes1
answer72
viewsAUTO_INCREMENT customized
i have in a db MYSQL two tables that are linked: ADMIN id - nome - empresa Each admin adds several values in the Docs table: DOCS id_doc - id_admim_doc - doc - valor The column id_admim_doc is a…
-
0
votes1
answer41
viewsError creating Trigger with more than one table
I’m having trouble creating a Trigger that modifies more than one table. DROP TRIGGER IF EXISTS vendedor_pago; DELIMITER $$ CREATE TRIGGER vendedor_pago AFTER UPDATE ON parcelas FOR EACH ROW BEGIN…
-
0
votes1
answer40
viewsVirtual column extracted from a json in Mysql does not receive NULL value
I have a virtual column called '_Cpf' that is extracted from the column '_Document' in json. Below is the following query: CREATE TABLE `user` ( `_document` json DEFAULT NULL, `_id` varbinary(32)…
-
0
votes1
answer111
viewsMysql - Best selling cars report using View
An idea of how I can create a View performing the creation of a report in descending order with the most rented cars in a certain period of time. Displaying in this report, the vehicle plate, the…
-
0
votes2
answers2862
viewsfill out combobox with database data
I am following a video of php with mysql and I am able to list the data of a table in a list (list), just so you know that the problem of connection with the database is already overcome. I tried to…
-
0
votes0
answers35
viewsHow could a SELECT perform better with multiple INNER JOIN
I have a SELECT with several INNER JOIN and some functions such as replace, if.. That one SELECT takes all the information I need, but it takes too long. Is there any way to optimize this SELECT?…
-
0
votes3
answers550
viewsFilter data with INNER JOIN - MYSQL
Good afternoon, I’m new to the group I wanted to know where I’m going wrong... I have a database search like this ** SELECT * FROM Users INNER JOIN naturezanegocio ON Users.emaillogin =…
-
0
votes2
answers533
viewsQuery data from two different tables and list without merging data
I am developing cash flow from my company and am encountering a difficulty. I have two different tables. One table is tb_compras(id, nfe, value, date) and then I have another also…
-
0
votes1
answer227
viewsQuery Mysql three tables
I am trying to make a query in the MYSQL database, but the query is not getting back what I wanted. I want to make a query where return all modules and modules that the company has with the clause…
-
0
votes1
answer246
viewshow to take a value from the table and sum with which to enter php
I am making a bank account system and in one of the operations the user has to make deposit only that my doubt this already made the table update that takes the value that the user and changes in…
-
0
votes0
answers123
viewsHow to fix the Auto Increment that is populating high numbers in the comic Heroku?
I’m coding a API Restful with Spring Boot v.2.0 etc. The case is that when I try to make a deploy to the Heroku using Migration (Flyway) of insertion the ids get high. My model or entity of User…
-
0
votes0
answers152
viewsGroup repeated data from a given column
I need to select and group the items, but as I have searched, my query will come from a database selected by a variable via post, and I will list the columns that are in a while coming via post from…
-
0
votes1
answer93
viewsRecover mysql tables name
I would like to recover the name of my java tables with mysql database. I don’t know if it’s correct I get a hashcode: (1) model.Campanhas@b 5cca49 (2) model.Campaigns@5c369e04 public…
-
0
votes1
answer46
viewsSimpledateformat cast String does not query in the database
I’m making a collaborative application for android, so I made a server in PHP, and send the data to this server. For a certain query I need to pass a date, from a Date Picker, here is the code:…
-
0
votes1
answer111
viewsDifficulty printing lines from a table using PHP and MYSQL
Hello, I’m making a CRUD with PHP and MYSQL and I divided the page into several blocks of code, each with a CRUD of each table of my BD, all are working perfectly except the one of the code below:…
-
0
votes1
answer573
viewsMysql SELECT with ORDER BY no GROUP BY
I have a table called contacts, all contacts made on the site are registered on it. There is also a table called status, where the service status of each is stored contact. The question, I need to…
-
0
votes1
answer18
viewsProblem when returning a query
Why when I run the query below, it returns records: SELECT COUNT(DISTINCT(dadf332.numped)) AS qtdped, DATE_FORMAT(dadf331.datlan, '%d/%m/%Y') AS datavenda FROM dadf331, dadf332 WHERE dadf331.numped…
-
0
votes1
answer38
viewsError creating tables with foreign keys
While running the script below occurs the error: Cannot add Foreign key Constraint when creating the last two tables. create database Cinema; use Cinema; create table Filme ( id_filmes int primary…
-
0
votes1
answer62
viewsMysql above 5mil lines
Good people I am developing a code only that I came across the following problem, when I performed performance test with 5,000 lines he exceeded the limit of 30 sec... what can be wrong?…
-
0
votes2
answers391
viewsSatisfaction survey form
I am with a following doubt, because I set up a search form and unfortunately it is not inserted in the database, I am possibly missing something. PHP code of registration --> <?php…
-
0
votes1
answer129
views -
0
votes1
answer32
viewsSelect from two columns showing also what is not related
Hello, I’m having the following difficulty: I’m using a Select that encompasses two tables tb_illness and tb_vaccine, but it does not display all values. EXAMPLE On the table tb_illness there are 33…
-
0
votes0
answers131
viewsError with fetchAll using order by
I’m making a task scheduling system. I need to show these tasks to the user, created a file called tarefas.php to query the Mysql database: <?php include_once 'conexao-calendario.php';…
-
0
votes1
answer44
viewsHow to select rows that match one of the columns in different tables?
I have two tables: one that registers the games of the round and the other that registers the guesses for these games. I want to show a table where the Game appears, the user’s guess X and if it has…
-
0
votes2
answers52
viewsGet mysql table id in application
I am developing an application in Java where I need to redeem the id of a Course table (idCurso, nameCurso, typeCurso). Here’s what I’m trying to do: public class Teste4 extends javax.swing.JFrame {…
-
0
votes1
answer2464
viewsInsert, add and display value (in real) using PHP and Mysql
Hello, I’m a beginner in PHP and Mysql. I would like to have a form where I insert a value (in real, in case), disappear with what I have already saved in the database, and finally display to the…
-
0
votes3
answers105
viewsError in Mysql query
Hello! this doubt arose in mysql query; because the status is coming different from the table? follow my consultation: SELECT DISTINCT max(idEmbreagem) as idEmbreagem, b.prefixo as idVeiculo,…