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
votes2
answers117
viewsExplode and compare value in a Select?
In my Mysql I have the following column data_id it stores values in this format 120-01-01, what a SELECT make a EXPLODE in that field and checks whether the first value of the array which in case…
-
0
votes3
answers69
viewsSelect by varchar position
I have in mysql database a field documento of the kind varchar. Records follow the following pattern: 123456789,12X456789. Or all in numbers or containing a letter in the third position. How do I…
mysqlasked 5 years ago Pedro Augusto 2,392 -
0
votes1
answer79
viewsHow to make an array of arrays for a multiple Insert in mysql with Node?
I need to make a multi-value database, for that I need a array of array. The first value of each array will be fixed and the second element I will change with a is probably: var values = [ ['281',…
-
0
votes0
answers92
viewsUpdate table after payment completed PHP
Good I’m trying to automate the release of products in my store so I made a purchase status system only that does not update the line that was paid or create a new line Behold:…
-
0
votes3
answers741
viewsCompare data from two tables
I have two tables: Tabela1 Tabela2 +------+----------+--------+ +------+----------+------------+ | id | idCidade | bairro | | id | idBairro | logradouro | +------+----------+--------+…
-
0
votes1
answer68
viewsSystem of scheduling of emails
I have the following problem: A user performs a step of an X test, when he clicks to get the first result I need to create 9 e-mail messages to be sent to the 3-day logo, morning (7:00), afternoon…
-
0
votes2
answers103
viewssql Where with max(timestamp)
I want to find the id of the most recent match in relation to and date, like "timestamp". I used the command: select partida_id from partida where 'data' = max('data'); But of error: SQL Error…
mysqlasked 5 years ago gabriel grazziani 3 -
0
votes1
answer18
viewsImport description from another table
Hello guys I have the following code: SELECT COUNT(*) AS categorias_total, v_lctos_despesa.id_categorias FROM 'v_lctos_despesa' INNER JOIN categorias ON (v_lctos_despesa.id_categorias =…
-
0
votes1
answer233
viewsYou are not setting the value in the.setParameter query when trying to make a query in the database
I’m having a problem when it comes to setting a value on query.setParameter. Use Ecliselink and Mysql, I made a query without setting parameters and it worked, I wonder if it can be? Class where I…
-
0
votes0
answers230
viewsADO Recordset returns nothing
I can’t get ADO Recordset to return records from a Mysql table. I’m using VB.NET in Visual Studio. I can establish the communication with the database, make the connection, create tables, all via…
-
0
votes0
answers48
viewsPHP put a carinha.jpeg symbol inside a <select> and record the selected.jpeg face in the mysql database field and display in the client
I have a table that generates 5 columns, I wanted to put inside a TD a select and inside the Select put 5 default images ( type emojis of Whats but in jpeg ) indicating the presence / status of the…
-
0
votes0
answers51
viewsGet PHP BLOB type
Next, I need to know the type of BLOB I am getting through my select, so I can set up a suitable header("Content-Type"), ie if my file is PDF, set header content as pdf, and so on.... I didn’t find…
-
0
votes0
answers53
viewsFatal Error Connecting to Mysql
I’m getting an error when connecting to database Php code: <?php $siteA = 'http://www.'.$_SERVER['SERVER_NAME'].'/'; $siteB = '/'; $email_suporte_staff = '[email protected]'; global $siteB;…
-
0
votes1
answer550
viewsPassing parameters on the SOAP web-service
I have developed a web-service to list students from a class. Insert, List are ok. As to Delete are not occurring. code list.php <?php //cliente include "cliente.php"; //chamada do metodo SOAP…
-
0
votes1
answer520
viewsHow to change the image according to a variable coming from the bank?
I’m a beginner in this part of front-end and made a function that returns an entire number from my Mysql database. I created 5 images, each one corresponds to a number returned from the bank and…
-
0
votes1
answer938
viewsdisplay data from a mysql database column under label
How to select a die from my table column and display it in a label? EX: id = 10 -> Banana Select * From tabela where id = 10 label.Text = Banana MySqlConnection conexao = new MySqlConnection();…
-
0
votes1
answer257
viewsTwo selects in a while with PDO
Hello, I’m migrating from Mysql to PDO and I’m having difficulty putting in a table two selects. try{ $CON = new PDO("mysql:host=localhost;dbname=tcc", 'root', '1234'); } catch (PDOException $e) {…
-
0
votes1
answer679
viewsHow to use Max() and Count() function together?
Talk personal! I am training a subselect with having using the MAX AND COUNT functions together, but Sqlserver is returning me an error called: "It is not possible to perform an aggregation function…
-
0
votes2
answers40
viewsLine numbering
Suppose the following table: id -- ano 1 -- 2014 2 -- 2014 3 -- 2014 4 -- 2015 5 -- 2015 6 -- 2016 7 -- 2016 8 -- 2016 9 -- 2016 I would like to get a list with a sequential count/numbering of rows…
mysqlasked 4 years, 11 months ago Alexandre Ruiz 9 -
0
votes1
answer699
viewsSum hours worked Mysql
I have records of a truck’s route on a chart. =================================================== This example up there I have 5 records I picked up in the table checking Speed > 0 The records…
-
0
votes3
answers182
viewsSelect returns nothing when I have NULL in foreign key
VOUCHER table: code, subproject Table SUBPROJECT: code, name my select: select a.codigo, q.nome as nomesubprojeto, a.subprojeto from comprovante a, subprojeto q where a.subprojeto = q.codigo and…
-
0
votes1
answer81
viewsModify PHP/Mysql table
I have a monthly billing chart that displays earnings from January to December. It sums up all table values pagseguro (spine ProdValor_1). Below is the code of the table: <?php $mes = array("0",…
-
0
votes1
answer75
viewsComplete other fields
Good night The problem was this, I have a select where it contains all registered products, autocompletei it with a foreach to pull all the products from the bank, what I want is the following, when…
-
0
votes1
answer68
viewsSQL ALTER TABLE
I need to make some changes in my bank, but before adding a new column I need to check if it already exists, if there is no create new column if there is no column then create Command found to check…
-
0
votes1
answer25
viewsDoubt blank PHP webservice request
Hello, I’m having a problem with one part of the code: function obterBD($nome){ // Conecatar banco de dados if(!$conn = connectBD()){ return false; } // Incluir/Atualizar retorno no banco de dados…
-
0
votes1
answer44
viewsE-mail after a change in the database
Hello, I am using Mysql database and have an event that runs daily at 1 hour. Within this event I check the date present in a row and compare with the current date, if the current date is lower then…
-
0
votes1
answer8422
viewsHow to insert data into a Mysql B.D with PHP
This is the form to enter data <html> <head> <title></title> <meta charset="utf-8"> <link rel="stylesheet" href="style.css"> </head> <body> <form…
-
0
votes0
answers37
viewsData protection against changes in Mysql
I need to protect a system’s data against database changes. It’s a system that uses financial transactions. I need a mechanism to prevent someone with access to the database from making changes to…
-
0
votes1
answer762
viewsHow to Save the File Path to the Bank
I am having a doubt I would like to know with saving the path of images and files that I currently upload I save this files in a folder but I would also like to have the path in the database how can…
-
0
votes2
answers261
viewsI connect to the database but the values do not change when I give UPDATE MYSQL Qt C++
The data is loaded in the table, then I change the data in the table, when I click on the update button, I can take the data (even the changes) and save it in the variable, but it seems that when I…
-
0
votes1
answer101
viewsProblem with wp_termmeta table
The following error is permanently occurring, recorded in my error_log: Error in Wordpress Table database 'odiletan_bd.wpTP737termmeta' doesn't exist na query SELECT term_id, meta_key, meta_value…
-
0
votes1
answer23
viewsSelect in Mysql
I have 2 tables city: id/idPreffect/idVice person: id/name The following select searches for me the name of the city and the name of the Mayor and his deputy... SELECT cidade.nome, ppref.nome as…
-
0
votes1
answer227
viewsInsert multiple PHP PDO values
I want to insert multiple values in the table, for each portion quantity informed. It’s all right, working though.. I need that every loop the due date has the month added up. The code below:…
-
0
votes1
answer44
viewsMYSQL - select that returns everything you have before a '-' or '/'
I have a column in my table 'RG_ORGAO' and there we will find filled rows like this: SSP - PUBLIC SECURITY SECRETARIAT DGPC - GENERAL DIRECTORATE OF CIVIL POLICE DMV - TRANSIT DEPARTMENT I need to…
-
0
votes1
answer21
viewsReturn a single line per code
I have a table that keeps a client’s record and its duration in operation. sql needs to return me only the last client term (the most recent one). no code can be repeated follows the result that sql…
-
0
votes2
answers34
viewsProblem in SQL statement
I have a problem with my code SQL. Well, I have this function that is in the class Usuario: public function CS_GetUsuarios($sql_aux = false) { global $objConexao; $strSql = "SELECT U.*, A.*, G.*, (…
-
0
votes1
answer106
viewsRow results in columns ( SUM )
Good Afternoon, I have a big question in my query, I have a table with the following info: I would like the following result I need the result to be the total value of (forms of payments) per day,…
-
0
votes2
answers721
viewsMysql sequelize error in Docker
I can’t connect the mysql api to Docker, but I can run mysql on Docker from the terminal index js. const db = require('../config/database'); const sequelize = new Sequelize(db) module.exports =…
-
0
votes3
answers1380
viewsHow to print an HTML using PHP a <ul> list of items with 3 different types?
I have a Mysql table called Plans with the fields: Which is a table of subscription plans of a website, the final template is as shown in the following image: Where: name = Name of Plan op1 = First…
-
0
votes1
answer732
viewsHow to see if there is already a record in the mysql and php database
Good afternoon community, I am currently revising some concepts of html, php, css, mysql, and was building a simple login system with a registration form, through some videos. So far so good, except…
-
0
votes2
answers91
viewsQuery Mysql Time Range
Hello, would need to make a query in a time interval in mysql, this interval would like it to be the START (current date) END ( current date + 365 days (1 year)), tried with KURDATE() but it did not…
mysqlasked 4 years, 10 months ago user11948309 3 -
0
votes0
answers226
viewsError: "mysql_num_rows() expects Parameter 1 to be Resource, null Given in Query was Empty"
I am working on a document management system and I am trying to create reports that show me which documents were inserted daily, but I get the following error: Warning: mysql_num_rows() expects…
-
0
votes1
answer402
viewsError Inserting the result of a SELECT into tables of different Mysql databases
I’m getting an error when generating a select and then giving an input, I have 2 different banks but on the same server and I’m giving a select in the registered database whose table is record and…
-
0
votes1
answer32
viewsHow do I put these two select together?
How I put these two together select in a query? //Retorna todos os dados do fornecedor SELECT * FROM suppliers WHERE id=$id //Retorna todos os serviços do fornecedor SELECT suppliers_services.*,…
-
0
votes2
answers109
viewsLaunch Exception with error #1452 - Cannot add or update a Child Row: a Foreign key Constraint fails
I am developing an application where the user type some information, two of them are Code Driver and Code. This is an excerpt from my code: try { $database->query($sql); $_SESSION['message'] =…
-
0
votes2
answers207
viewsLogin comparing user input to encrypted data in Mysql
I’m having trouble finding a way to compare the data entered by the user in a jPasswordField on the Login screen and compare with the encrypted password in AES and saved in the Mysql database. Can…
-
0
votes1
answer20
viewsIs it possible to retrieve fields other than the foreign key?
The doubt is as follows: I own these two tables: Note that carro_id is a foreign key in the table "person"... If I want to bring a query like for example: "Name of Person, Birth, Brand of Car and…
-
0
votes1
answer91
viewsData being multiplied in the table
I have a register of recipes and this register has a button that clones the fields "amount of ingredients" and the "combo box of ingredients". If I add only a quantity and ingredient, the…
-
0
votes1
answer299
viewsHow to select multiple data from related tables
I created three tables in the student database, book and loan, I would like to list all the books that were loaned to each student, however, when the student borrows more than one book the command I…
-
0
votes1
answer693
viewsCountdown of days to a future event
A system that registers resumes, the resume is active for months after the registration date, which in my table is the variable $row_curriculos['created']; I managed to create php that says the date…