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
answer56
viewsWordpress slow and with database access errors
All right guys, I had asked another question, but I was able to identify some queries that are consuming a lot of running time. I developed a theme for a news portal, and in each area I upload news…
-
0
votes1
answer936
viewsLink calling method in Controller - C# MVC
I have a Mysql table that is shown on a page of my project: foreach (var item in Model) { <tr> <td>@Html.DisplayFor(modelItem => item.id)</td>…
-
0
votes1
answer27
viewsTotal digit check in Mysql
Well, I need to select values formed by a total of 5 digits that start with "1" and end with "0". In the table, this attribute is of the decimal type. How can I perform this SELECT?
-
0
votes2
answers226
viewsGroup by date in a timestamp field
How I can group data from MYSQL by date, and in BD the field and Timestamp 2019-04-18 08:01:10 $sql = "SELECT * FROM tbl_reclamacoes GROUP BY data_reclamacoes ORDER BY data_reclamacoes ASC";…
-
0
votes0
answers33
viewsBest practice for next PHP+ Mysql numbering
I have a PHP + Mysql application, and I need to create a next numbering of a record according to another column. Therefore, AUTO_INCREMENT does not solve, because it always adds one more,…
-
0
votes1
answer84
viewsSelect does not display data in listview
I cannot get feedback from my select in the database. Where I show the data in a listview. using (_connection = new MySql.Data.MySqlClient.MySqlConnection("Database=roubo_furto; Data…
-
0
votes0
answers39
viewsMysql - What would be the pure sql query that would be equivalent to Laravel Sync in a pivot table?
When I work with Laravel in a pivot table where we have only the fields user_id and post_id we use something similar to $user->posts()->sync([3,4]) and the pivot table will be updated with…
-
0
votes1
answer18
viewsSave filter to tablesorter
I have a system that returns registered clients with tablesorter, but when I edit a user and go back to screen, the filter performed to find a particular group of customers changes, there is some…
-
0
votes0
answers45
viewsJava Web / Glassfish application stopping
I’m having a problem and unfortunately I’m not finding the cause. I have 3 Java Web applications running on a Glassfish server and what happens is that these applications suddenly stop working.…
-
0
votes1
answer212
viewsFormat xml in php to write to Mysql?
I need to format a xml in php to record on MySQL, but I’m having a hard time understanding it and even doing it. Today I have this xml: <?xml version='1.0' encoding='UTF-8'?> <api>…
-
0
votes1
answer85
viewsSearching between two dates
I have a C# program that assembles a report and can filter by name, but I want to go further, I wanted to pull all the records between two dates. Good as I do to assemble the WHERE of that filter by…
-
0
votes0
answers50
viewsMake SQL query with subquery using Where with quotes
I’m trying to make a SELECT with a subquery where the field is in the where of subquery is a field of the main table. However, this field needs to be in single quotes and when I do so, mysql…
-
0
votes0
answers28
viewsASP.NET MVC project using Entityframework
Guys, a very beginner question, I did an ASP.NET MVC project using the Entityframework, I did using the standard Unitofwork: public class UnitOfWorks : IDisposable { // Context private AgendaContext…
-
0
votes2
answers548
viewsHow do you get value from the serial port?
With the code below I get four values (1,2,3,4) sent by the serial port of Arduous, values are not sent together or will come out 1 or 2 or 3 or 4. serialPort1.Open(); string entrada =…
-
0
votes1
answer51
viewsSQL CASE command
I’m trying to select only 5 characters from the field description, tried several ways and it doesn’t work, the eating I’m giving is this: SELECT description = CASE WHEN LEN(description) > 5 THEN…
-
0
votes1
answer344
viewsInsert multiple columns and tables into a variable in mysql
I am in a simple dilemma (I believe) I have 3 tables in question.. the Associated table and the Request table and the box. The associate fields are: id, ref_by, name .... The fields of the request…
-
0
votes0
answers20
viewsPhp data Insert error
I’m trying to insert date into a php record, only it’s presenting an error, which I imagine is quite simple, but it’s taking me a precious little time. I’ve tried to put date('Y-m-d H:i:s',…
-
0
votes1
answer36
viewsChange a table in the database from a date in another table
I have a ban_logs table that contains a date and needs that after that date, an event or Trigger is enabled to change the is_banned field of the user_data table. ban_logs id, user_id, date,…
-
0
votes0
answers135
views -
0
votes1
answer3105
viewsHow to assign the value of an Excel column in an SQL command
I was able to connect to my Mysql Database via ODBC, and display the information I need via SQL command, but I would like the contents of a particular cell of my spreadsheet to be in this SQL query,…
-
0
votes1
answer80
viewsReturn a value from a MYSQL/JAVA column
I have the following code to store the maximum value of a column in a variable integer codemax: cf = new ConnectionFactory().getConexao(); int codigomax = 0; try { stmt1 =…
-
0
votes1
answer34
viewsHow to get the most distant date in Mysql?
I have the following tables boi ------------------------------- id | peso | data_pesagem | ------------------------------- 1 | 175 | 2019-01-02 | 2 | 200 | 2019-01-03 |…
-
0
votes0
answers33
viewsValue sent to the database becomes zero after sql return
Good afternoon stack overflow. I have the following situation. I need to calculate the amount of days a status takes to change. For example, the registration of my partner is with the status of…
-
0
votes0
answers46
viewsHow to make two xml file calls in the same document
I wonder if you can generate two XML files in the same document. That’s the code I’ve got so far: downloadUrl("connect_xml.php", function (data) { var xml = data.responseXML; var markers =…
-
0
votes1
answer43
viewsHow to organize my project and be more productive?
Good evening guys, I’m a beginner let’s say so, and I’m having a hard time organizing my project, because even knowing what I want I don’t know the order of the steps to complete my goal, and I find…
-
0
votes1
answer1165
viewsValidate if there is already registration in the bank before filling out the form
I have the following form: <form class="form-horizontal" action="cadastrar.php" method="GET"> <fieldset> <legend>DADOS CADASTRAIS</legend> <input type="hidden" required…
-
0
votes0
answers53
viewsApplication Service connect to Azure’s external Mysql database
I’m trying to connect wordpress that is running on an App Service on Azure. In the main domain I have an ASP NET MVC application and configured an application to run wordpress in the same domain.…
-
0
votes2
answers802
viewsDuplicate multiple Table Records at once
I’m developing a payment system for my company, where there are two different types of accounts. Exporádicas (Ex. IPVA, Pen-Drive, etc.) and Fixed (e.g. Electricity Bill, Water, Telephone, Internet,…
-
0
votes1
answer356
viewsError with Mysql insertion with JDBC
I’m running this code: /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the…
-
0
votes1
answer143
viewsIf inside if while inside while inside while (slow)
I’m having a question about loop while: I have the following query: $sql = "SELECT id,cod,nome,cnpj,insc_estadual,tributacao FROM empresas_base WHERE tributacao = '$filtro_regime_nome' AND…
-
0
votes0
answers54
viewsData being duplicated in date attributes within a foreach
I’m creating a star rating system where I list the posts and shows classification. The problem is in posts who receive the same note. You are not picking up each note post and yes of a single post…
-
0
votes2
answers421
viewsProblem when mounting JSON with database return
It all comes down to this image: The problem is in the JSON mount, it does not group the first result and assigns an array to the dates, as it should be in the image below: Is there a plugin in…
-
0
votes1
answer620
viewsCan’t find the php controller with Laravel
Hello guys I’m starting with the Standard, I’ve come across a problem. I created the controller, the routes, but even so, it’s giving me the following error: Class App Http Controllers…
-
0
votes1
answer44
viewsHow to select everything but top X in MYSQL
I’m scheduling a personal scheduling project and don’t know how to implement a SELECT in all tasks other than the top 5 of the day. How do I implement this in mysql? For example, I have a SELECT *…
-
0
votes1
answer29
viewsReturning Mysql Table Fields
Hello, I have three tables: profissional (id, nome, idtratamento) usuários (id, nome idtratamento) formulario (id, data, idprofissional,idusuario) and another: tratamento (id, descricao) I need to…
-
0
votes1
answer40
viewsGenerate sql from a js return
Good morning, stack overflow. It’s been a while since I’ve been hammering to look for a solution to a problem that came up, that nothing comes to mind. I have a form, where this form will make a…
-
0
votes0
answers106
viewsWhat’s the UPDATE error? (Java with Database)
Hello, I am developing for the first time a system in Java with Database and there is some error in the Update that since yesterday I look for and not found. The error is that when I click to…
-
0
votes4
answers7488
viewsHow to change the database name in Mysql Workbench 8.0 using ALTER DATABASE?
I have a database called teste with about 3 tables and me wanted to rename the database of teste for novoteste. I guess that’s what you do with ALTER DATABASE only I don’t know this command.…
mysqlasked 5 years, 6 months ago user141036 -
0
votes2
answers830
viewsUnhandledpromiserejectionwarning: Sequelizedatabaseerror: Table 'salao. Users' doesn’t exist
Good morning, I’m facing the following problem Executing (default): INSERT INTO `Users` (`id`,`name`,`email`,`avatar`,`password_hash`,`provider`,`createdAt`,`updatedAt`) VALUES…
-
0
votes0
answers106
viewsGraph updating every n seconds
I am using Google Charts and I need to make a chart that updates both the values of the x axis and the y axis every n seconds. I need 50 data to be used for each update, so I used one SELECT max(id)…
-
0
votes1
answer23
viewsStore each news in a table or a table for all news?
I’m setting up a news site. For a faster and more efficient database it is more correct that I create a table to store all news or create a table for each news? In case you create a table for each…
-
0
votes1
answer36
viewsThe posts are getting on the last page in the PHP MYSQLI pagination system
Good evening. Can anyone help me with a problem I’m having? Well... I did a pagination posting system, but when I add more data into the database the new data is on the last page instead of the…
-
0
votes0
answers142
viewsMysql - Value limit for mathematical operations
I am in doubt about the following situation: I have two values not stored in table. Valor 1: 9223372036854775806 (Onde este é o valor máximo de um tipo de dado BIGINT) Valor 2:…
-
0
votes1
answer89
viewsError 500 in php code with linux
I have the following connection to the bank: $pdo = new PDO('mysql:host=localhost;dbname=teste;charset=utf8', 'root', ''); In windows it works perfectly when I started the project on linux from…
-
0
votes0
answers22
viewsHelp on this select I need a clause to delete records
Good evening, I need to solve a problem in this consultation SELECT * FROM campanha WHERE limite > '0' AND tipo = '1' ORDER BY rand() LIMIT 1 I need to do the same query plus deleting all…
-
0
votes0
answers25
viewsDoes the following equation respect the syntax of Relational Algebra?
π Nome.Empregado (σ Empregado.IdentEmp = TrabalhoNo.IdentEmp ^ TrabalhaNo.ProjNum = Projeto.ProjNum ^ Nome = ‘Banco de Dados’ ((Empregado x TrabalhoNo) x Projeto)) More specifically in the part I…
-
0
votes0
answers84
viewsHow to call input text function when clicking in the category
How to create a function that by clicking on category it opens a screen with input text for an observation in the request. If anyone can help me with that, I give two complete systems for PDV. My…
-
0
votes0
answers734
viewsCreate search box in modal Bootstrap
I wonder if it is possible to create a modal window to search for information and select it for a form. For example, when you click on the magnifying glass open a modal with all the individuals…
-
0
votes1
answer50
viewsSelect to show clients that are not in another table
What is the correct way to present my client table with the following clauses: Be more than 60 days without purchase, not in the Links table or have more than 20 days since the last call. Fields…
-
0
votes2
answers78
viewsSQL + PHP Query: Take only data from the current year from January to Today?
I need the return of data between 01/year to the present day. But I’m still not very familiar with SQL and PHP date(); Here is the excerpt from the code: $startMP = date('Y'); 'BETWEEN '{$startMP}…