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
answer50
viewsCoverter Int in Vachar - Mysql
Personal talk Good afternoon. I’m making a list of columns in my Files table. And I needed to convert a "Id_folder" column of the INT type into Varchar at the time I Brought the data after the query…
-
0
votes0
answers57
viewsTesting mysql API and nodejs integration
I have an API written in Nodejs (express) that uses the library mysql to pull data from a database hosted on AWS. API endpoints are basically SQL queries, almost without logic associated with data…
-
0
votes1
answer425
viewsResult of a SELECT to use in another SELECT?
I know the title is a bit confusing, but I’ll explain it here: I have a select, which displays for me the stores that have a promotion (CONSULTATION 1): SELECT * FROM empresas INNER JOIN promocoes…
-
0
votes1
answer1040
viewsPHP Error Parse error: syntax error, Unexpected ';', expecting ')' when making an array foreach
I’m having trouble making an array foreach, is showing error, follow the code below: <table style="width: 100%;"> <thead> <tr> <th>Item</th> <th>Código</th>…
-
0
votes1
answer129
viewsHow to concatenate the return of a query to a string from another mysql
I have the following query: SELECT id AS CODIGO, nome AS NOME, versao AS VERSAO, build AS BUILD, data AS DATA FROM sistema INTO OUTFILE 'D:/servicos/export/exportaVersao.csv' FIELDS TERMINATED BY…
-
0
votes2
answers142
viewsWord problem using quotes when doing INSERT SQL
I’m having problems when I will perform the Insert in mysql when I have a word that contains ex Quotes (box d'agua) in any input form, when I have the mysql error saved. I have already changed the…
-
0
votes2
answers65
viewsPHP update com for
UPDATED I need to update a table with input fields as below: <table style="width: 100%;"> <thead> <tr> <th>Item</th> <th>Código</th>…
-
0
votes1
answer282
viewsI want to total the multiplication of two columns
SELECT ID_PRODUTO AS CODIGO, BARRAS AS CODIGO_BARRAS, PRODUTO AS NOME, ESTOQUE AS QUANTIDADE, CUSTO, **(ESTOQUE*CUSTO) AS VALOR_TOTAL -- A TOTALIZAÇÃO É PARA ESSA…
-
0
votes0
answers18
viewsMysql 8 Installation Error
Due to a problem in my OS yesterday, I ended up formatting my PC, and when I went to install mysql-server, downloaded version 8 as default by apt-get, everything was set up, went to use and when I…
mysqlasked 4 years, 4 months ago Willian Ferrera 29 -
0
votes1
answer52
viewsHelp with database schema
I am developing an order control system, and I am finalizing, but now I came across a problem in the payment part scheme: I’m linking the id_pedido with the payments, however, when the request costs…
-
0
votes3
answers882
viewsInsert multiple php mysql records
I am developing a record site and when the user register the vehicle he has the option to insert various images of the vehicle. I have the upload code, but I wanted to know how to insert more than…
-
0
votes3
answers118
viewsLogic for using foreign key - a user’s notes
I am aware of a problem in the use of foreign key. I cannot find the logic for a system: The problem: the user gives a note for each question, each one being a table field, and at the end the…
-
0
votes1
answer78
viewsHow do I complete SQL table name with a variable value?
I want to create a new table for each client and I want to complete the account table with the client id I am creating in another table as in the example below: await db.run('create table if not…
-
0
votes1
answer2436
viewsField'valorClick' doesn’t have a default value
I have a problem, I add the news and I get the error "Field 'valorClick' doesn’t have a default value". This "Valorclick" is a value that clicking on the news link adds x money. Here is the code to…
-
0
votes1
answer128
viewsRecover city from database id
I’m getting information from a select, which pulls the states and cities registered in the database. In the value of each select (city and state) is their id in the table (only this way to work with…
-
0
votes1
answer22
viewsSpecific cell change in Mysql
Well, I am trying to change only a specific cell in Mysql using a PHP form, however, I cannot perform such action and no error is shown so I try to fix it, how can I fix the problem? Logic <?php…
-
0
votes1
answer25
viewsforeign key problems when selecting items
Well, I’m trying to select all items from two separate listings, but without success, I’m using: Query select t*, d.id as id_discvinculada from textos as t join disciplinas as d on…
-
0
votes0
answers141
viewsProblem of slow consultation of PROCEDURE
There is in my system an email sending routine. Where a bat windows executes a php file that sends the same. The problem is in a stored Procedure, that executed directly by the bank, brings the…
-
0
votes2
answers110
viewsProblems in using php Insert
I would like to ask a question, I’m trying to make a simple Internet with php and mysql but I’m giving 3 errors, I’ve already found that are the connection, only I give the include in the connection…
-
0
votes1
answer76
viewsHow to check if a mysql database table already exists with codeigniter4?
How to check if a certain Mysql database table already exists with codeigniter 4, and if it does not exist, create this table ?
-
0
votes1
answer38
viewsAssign values from a select to a variable
Well I am mounting a procedure in Mysql, and inside it I have the following code: DECLARE valorConta DECIMAL DEFAULT 0; DECLARE valorPGConta DECIMAL DEFAULT 0; SELECT Valor INTO valorConta FROM…
-
0
votes1
answer122
viewsFunction returning Undefined
Function returning Undefined, do not know what to do…
-
0
votes2
answers155
viewsRemove 1 day from a specific date
Good morning, everyone! I would like a help regarding the database, where I pick a date and after I pick up this date I need to remove 1 day from it, thus pulling the result from 1 day prior to the…
-
0
votes2
answers1413
viewsMysql - Select comparing fields from the same table
I know it’s supposed to be simple, but I’m having a hard time getting through this. I have a table called "enterprise". In this table, I have 4 specific fields that store different ID’s from other…
-
0
votes0
answers125
viewsField Date register date
I have a table that one of the fields is date type. On my page insert.Asp when I type the date for example so 10/07/2017 or 2017-07-12 not saved in Mysql database. The error that is shown is this:…
-
0
votes1
answer21
viewsIs it possible to perform an innerJoin to know the quantity of the second table?
I am making a database with two entities, where entity "A" is a category, and in each category contains several items, in the case entity "B", what I need to know is: it is possible to bring…
mysqlasked 4 years, 3 months ago WEB Last Wolf 135 -
0
votes2
answers33
viewsQuery SQL listing shopkeepers by id and status
Personal I have a table where I list purchases of customers, in this table I have information as the id of the shopkeeper and the status of the order, this status goes from 0 to 6, however I would…
-
0
votes3
answers43
viewsRegistering form in the Database
<body> <?php $titulo = $_POST['titulo2']; $cap = $_POST['capitulo2']; $opt = $_POST['opcoes']; $conexao = mysqli_connect("localhost","root","","report"); $sql2 = "insert into avise…
-
0
votes0
answers29
viewsRegister in database when user closes browser window
I am developing a system that needs to have recorded the time that the user was logged in to the site. When he login I register in Mysql the login time and his ID, the problem is at the time he…
-
0
votes1
answer547
viewsUse While twice or more for the same Select?
I’m setting up a listing page and registration of output products and I’m having trouble at the time to pull up the information and do the while for the second time. Example: $sql_for = mysql_query…
-
0
votes0
answers130
viewsInner Join in 5 tables
I have the tables: reparable projects contracts itens_contracted controle_contracts I made that Consultation: Select a.qtd as quantidade_contratada, b.pn, c.numero_contrato, count(d.id_pn)…
mysqlasked 7 years, 4 months ago Andre Maia 105 -
0
votes1
answer64
viewsTruncated incorrect DOUBLE value?
Guys I have this UPDATE code to do, where it adds the previous value of the column (valor_abertura) with one who comes from UPDATE, but he gives the error: Truncated incorrect DOUBLE value. the…
-
0
votes1
answer46
viewsWhere is the error?
I’ve reviewed this query several times but I don’t find the error. "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to…
-
0
votes0
answers80
viewsProblems to the popular Tableview
Good morning! When I run the code my Tableview pulls 2 blank lines. I am not able to show the inforamations in table view. Follow code below: Controller: package br.com.unitymanager.controller;…
-
0
votes2
answers48
viewsLIKE query in Mysql
How can I make a Mysql query that only searches for results that start with numbers and special characters, I know this is done with the LIKE, but I still don’t know how to get that result...…
mysqlasked 4 years, 2 months ago user106463 -
0
votes1
answer134
views -
0
votes1
answer97
viewsGroup employees by company in query
I’m making a report, where I need to follow the following layout: With the query below, we ended up creating more lines, instead of grouping employees per company: select e.cnpj as cnpj,…
-
0
votes2
answers385
viewsSend blank field to database
I created a database and am sending the information normally. However, I have an optional field in the form. If the user wants to provide more details, he normally writes, if not, I wanted to send…
-
0
votes0
answers38
viewsHow can I update Mysql to an entire column if another one is doing it?
Somebody smart can help me with this? I have a table in Mysql named "Sellers" and I wanted all the rows in a "seller_image_s3" column to receive an update of "1" if the "seller_image" column is…
-
0
votes1
answer35
viewsError 1064 in Mysql Workbench
I wrote the following code for the college database class: CREATE DATABASE estoque; USE estoque; CREATE TABLE produtos( /*o erro ocorre aqui nesse parêntese*/ INT codP, CHAR (20) nomeP, FLOAT…
-
0
votes2
answers510
viewsHow to select data from the previous month and year?
I’m trying to search from dates in Mysql. I need to obtain the total sum of a value where the year and month are smaller than those reported in the variable: SELECT SUM(valor_pag) FROM controle…
-
0
votes0
answers64
viewsUsing filter_var() Sanitize with Pdo, do I need to use statements?
I wonder if even using filter_var with Sanitize you need to use Pdo statements. Is it safe to do so? or do I need to use bindValue for example() <?php $con=conectar(); //Recebe número da pagina,…
-
0
votes1
answer230
viewsRetrieve remaining data via array ID
How do I get the data that was not passed via $_POST, but are already saved in the same table that I am receiving some data, such as ID,NOME_PRODUTO,etc., in an array, which receives data from…
-
0
votes1
answer66
viewsInsert data into database using PDO
$servidor = "localhost"; $usuario ="root"; $senha=""; $db="pdo"; $conexao = new PDO('mysql:host = localhost; dbname = pdo', $usuario,$senha); $stmt = $conexao->prepare('INSERT INTO…
-
0
votes1
answer79
viewsDifferent DECIMAL type field between Mysql4 and Mariadb
I have the following problem: I have a decimal field(11,2) When the calculated value gives (example) 60,345 My SQL 4 Insert saves 60.34 But Mariadb Insert 10.4 (and Mysql 8) record 60.35 This is…
-
0
votes0
answers25
viewsError in mysqli_query
I’m creating a system of login and password only that is giving the problem and do not know how to solve if someone can give me the code already edited thank <!DOCTYPE html> <?php $conexao…
-
0
votes2
answers56
viewsQuestion about GIT and how to use an existing project on the server?
I’m currently getting into the git method, and I’ve really liked the way the development flows. But I ran into a problem. I have several projects that are already on their proper servers, sent via…
-
0
votes2
answers150
viewsDoubt with SELECT in MYSQL database
I need an sql that, in the table below, always bring the last insert to each user. I tried with distinct but it didn’t work. So in the case below sql would bring the results of row 2 and 5. Detail…
-
0
votes1
answer424
viewsHow to check if a data exists in the table before inserting Mysql + Python
I’m trying to verify if a data already exists in the database before entering. My code is like this: nome = input("Insira seu usuario: ") seleciona = "SELECT nomes FROM slogin"…
-
0
votes1
answer35
viewsSelect records under multiple conditions
Code help for selecting in Mysql. Conditions are: for same 'net' and 'time' records, select the first record (min id) and another record if 'AP' is different for records of the same time and…
mysqlasked 7 years, 4 months ago Frank Queiroz 17