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
votes3
answers402
viewsHow to do an operation on a Trigger? MYSQL
CREATE TRIGGER aumentarsalario AFTER INSERT ON empregados FOR EACH ROW BEGIN UPDATE EMPREGADOS SET SALARIO = NEW.SALARIO * (NEW.SALARIO*(10/100)) WHERE NEW.SALARIO < 900; END IF END How do I put…
-
0
votes2
answers780
viewsLine break within a MYSQL query
Hello someone can help me with line breaking within a mysql query? The code goes like this: CONCAT('Origem -> ',vEnderecoOrigem,' \r\nDestino ->',vEnderecoDestino) The result: Origem -> Rua…
-
0
votes0
answers668
viewsorg.hibernate.Exception.Jdbcconnectionexception: Could not open Connection
I am having trouble losing connection to Mysql database, which occurs after few minutes of use. Please, can someone help me? I have no idea what it could be. Follows my codes: Hibernate.cfg.xml…
-
0
votes2
answers532
viewsConcatenate variable with id fetched by Javascript
Hello! I have a code for autocomplete here that’s giving me a bit of a headache. My code consists of a foreach that generates a line to each record found, to each line generates a button that calls…
-
0
votes1
answer330
viewsHow to synchronize mysql database (security backup)
I have a website hosting files, (file server), I synchronize the files with another server.. in case something happens I have a copy of all the files.. But is there any way to always save a copy of…
-
0
votes0
answers178
viewsNo refresh search by select
Good evening... I would like to know how to do a search through a select and of checkbox, as on the website of the webmotors... I looked on the Internet but found nothing like it... Someone knows…
-
0
votes0
answers89
viewsLaravel Routes 5.6
Gentlemen I’m having trouble setting the wheels and returns me the following error: protected function methodNotAllowed(array $others) { throw new MethodNotAllowedHttpException($others); } I’m doing…
-
0
votes0
answers49
viewsHow to search a single field of 3 tables with JOIN using Respect Relational?
I’m starting to use the framework Respect\Relational and I was just trying to get the names of the chart templates that belong to the id 1 business line, but all the forms I tried always returns all…
-
0
votes0
answers81
viewsUsing Store Procedure for User Authentication
I have the following Store Procedure in my Mysql database, SP_Autentica: BEGIN SET @id = (SELECT ID FROM userdata WHERE Username = user AND Password = pass); END In the ASP code, conn.asp:…
-
0
votes2
answers560
viewsSave reports to a table or run a database query?
I am setting up an e-commerce where I have an area to generate sales reports. These reports are divided by year and month. Currently I have a query sql where segment the results by year and month…
-
0
votes1
answer722
viewsHow to replace all values of a given table in MYSQL at once?
I have a table (produtos) who has the spine product_params Several products have the value of this table with max_order_level="" and I want to replace everyone for max_order_level="1", i.e., change…
mysqlasked 6 years, 6 months ago Leandro Marzullo 1,401 -
0
votes0
answers237
viewsError trying to install mysql-Connector-Python
I have installed version 3.6.5 of Python, and decided to install the "mysql-Connector-python-8.0.11-py3.6", but it returns an error that does not find such an installed version, it will need…
-
0
votes1
answer60
views -
0
votes2
answers98
viewsSelect data from three SQL tables
I am trying to join data from three tables using this sql: SELECT cod_nota, cupom, valor_contrato, valor_cadastro, data_emissao FROM cupons_nota, vendas, notas_fiscais WHERE cupons_nota.cupom =…
-
0
votes2
answers1769
viewsProtect from sql Injection in php
I have this code to insert: $name = isset($_POST["DescricaoProd"]) ? $_POST["DescricaoProd"] : ''; $unid = isset($_POST["DescricaoUnid"]) ? $_POST["DescricaoUnid"] : ''; if (!empty($name) &&…
-
0
votes1
answer30
viewsForm does not insert data into the database after submission
Why does the following code not enter? Someone experienced can tell me the code below does not present an error yet does not insert in the bank. <form action="index.php" method="post">…
-
0
votes1
answer36
viewsHow to display results if my select turns out to be false?
And I’m having the following problem, there are two POSTS and TOPIC tables, one topic has several posts, and I’m displaying the topics by sorting the most current date of the topic post, only when…
-
0
votes0
answers44
viewsturn Procedure into Function
I’m trying to turn this procedure in function, to use inside another procedure, but I can’t evolve: CREATE PROCEDURE bancodados.sp_calculo(param_id_cnpj varchar(14)) BEGIN SELECT id_cnpj,…
-
0
votes1
answer117
viewsMysql - How to get results that were not found
I need to verify which Ids were not found in the table. SELECT * FROM example_table WHERE id IN (123, 124, 125, 126, 127) Whereas of (123, 124, 125, 126, 127), on the table I only have (123, 124).…
mysqlasked 6 years, 6 months ago zakharuk_pasha 23 -
0
votes2
answers103
viewsHow can I select a range of items, after some values using SQL IN operator
For example: I want to fetch, 1,2,5,7,11 and then the rest up to 100, in a DQL SELECT. Ex.: SELECT column_name(s) FROM table_name WHERE column_name IN (1,2,5,7,11 ... value100); In case my doubt is…
-
0
votes0
answers139
viewsBuild error when adding "using Mysql.Data.Mysqlclient;"
when I add using Mysql.Data.Mysqlclient; appears the following error message: "cannot start debugging because the debugging target 'c: users Documents visualstudio2018 Projects Application bin Debug…
-
0
votes0
answers259
viewsSQL query in 2 database on different (mysql) servers
Hello. First of all, I make it clear that I don’t know if this is possible. I am trying to make an SQL query where I need the union data (INNER JOIN) of 02 tables that are on different servers (One…
-
0
votes1
answer98
viewsI cannot save the information to the Database (PYTHON MYSQL)
I am trying to insert this query, but it n registers in the Mysql table, however I realize that it is accessing right, because it always uses a position of 'Cod' which is primaryKey *when using the…
-
0
votes1
answer141
viewsSave contents of a Listbox to mysql database
Good morning, I have a listbox and I’m having a hard time storing the contents of that list in the Mysql database. Someone could help me. I followed code and error below: def SaveVariosCodBr(self):…
-
0
votes0
answers155
viewsDatabase - Merge tables with different structures
My main question is: what is the best way to do and not which commands to use. What I need, basically, is the following: I have two tables with different structures, in different databases. For…
-
0
votes1
answer18
viewsSyntax error in SQL when starting OW2 Orchestra
I recently downloaded the OW2 orchestra software. In the user manual, after going through all the configuration steps (I’m using Mysql as my BD. The other settings are the defaults, including the…
-
0
votes0
answers287
viewsModeling Banks Financial Institution
I am starting a personal project for my learning, an application simulating a financial institution system, first using the following products: current account, credit agreement (loans). I came…
-
0
votes0
answers70
viewsHow to set timeout to dump in database.php?
I need to increase the timeout of MySQL for the execution of a dump bank. 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '3306'),…
-
0
votes2
answers516
viewsUpdate or Insert with data from another table
I have this command SQL to update the tableREQUISICOES with the table dataREQUISICOES_ATUALIZA. Use as key to update the field numero_requisicao, but I need if not find correspondencia on the table…
-
0
votes0
answers58
viewsComparing three column records in a mysql table
I make an appointment at COL1 which has the total of lines and then make an appointment at COL2, but it is smaller than COL1. How do I make COL2 return me the Ids equal to those of COL1 so that they…
-
0
votes2
answers271
viewsWhat field do I use to store a timestamp in mysql?
I need to store a timestamp with php, only I don’t know what would be the best field of mysql to use.
-
0
votes2
answers38
viewsHelp Foreach stdClass
Good morning :D I need a light! I need to take all 'ids' of users of a table and pass to another table, but when I give a foreach it returns me only 1 result as stdClass. Follows the code: $stmt =…
-
0
votes4
answers4522
viewsCount number of records in a Mysql table with PHP?
Guys, I have a database with a table called "users", and I would like to know how I do, through PHP, count how many records there are in this table, and then give an echo to show this amount on the…
-
0
votes1
answer48
viewsSearch for NULL mysql via Java
I intend to save a residence in my database via java when one of the searched parameters is NULL, but it turns out I can’t find a way to pass that command. My code is: public Usuario…
-
0
votes0
answers53
views -
0
votes1
answer42
viewsProblem inserting special character in Mysql
When I insert some information in Mysql through the form in my system is saved all wrong in the BD, the characters ç, `Uga everything, but insert manually in the right phpmyadmin. In HTML I put the…
-
0
votes1
answer737
viewsRecovering images from database using PHP+MYSQL
I need to upload images from a Mysql database using PHP, and then put inside an HTML tag, I’m not getting through using this code: $con = mysqli_connect("localhost","roberto","",""); $query =…
-
0
votes0
answers280
viewsError in MYSQL query
I have the following query select DISTINCT(p.id),g.id, p.slug, p.nome from game g join game_plataforma gp on g.id=gp.id_game join plataformas p on gp.id_plataforma=p.id group by g.id,p.id,p.slug,…
-
0
votes1
answer100
viewsNetbeans 8.2 Error "java.sql.Sqlexception: Unknown system variable 'query_cache_size'"
I cannot connect to a Mysql database through Netbeans IDE, the following error is reported: java.sql.Sqlexception: Unknown system variable 'query_cache_size'
-
0
votes1
answer35
viewsContent overlaid on the page
I have two forms that overlap with the other contents of the page. I needed opinions on what mistake is causing this and how to put the forms below the rest of the content <div…
-
0
votes1
answer524
viewsHow to save a custom Enum name in the database?
I have an Enum Type which has a JURIDICAL person and a PHYSICAL person. I created a custom name (Legal) and (Physical). I’m getting to appear on the screen the custom name, but in the database is…
-
0
votes1
answer27
viewsFeed div after receiving new data
I started to implement a chat and needed to update the div where the messages are inserted, but when I get new messages I need to update the page to have access, and if I set a timeout to 10 in 10…
-
0
votes1
answer26
viewsHow to register new things in Wordpress without using post type?
Guys I’m studying the creation of themes in Wordpress and I found the use of post types very interesting... But there are certain situations that become unfeasible and get a face of gambiarra...…
-
0
votes2
answers322
viewsAdd Mysql column with increment not to repeat
My intention is to pick up a variable via POST and change its value. $vem = $_POST['nome']; if (isset($vem)){ $vem = 1; $vem++; $vem = 'campo'.$vem; } I will add as column of a table within this…
-
0
votes0
answers944
viewsMysql-Workbench giving dump error
I’m working with Mysql-Workbench, but when I’m going to dump (import/export), He gives a mistake, looks at the image below, knows how to solve ?…
-
0
votes1
answer71
viewsInconvergence of consolidated results x by interval
I am making a query for 10 minutes interval between date, the problem is that when I give a between to count all the results it returns a value and when I divide these values by interval and sum at…
-
0
votes1
answer60
viewsSoftaculous with Mysql connection error
I’m working on a hosting server with centos-webpanel and with a server MySQL remote. The centos-webpanel is already working normally with remote Mysql, it creates the databases and users the…
mysqlasked 8 years ago Danilo Aparecido Fogaça 1 -
0
votes1
answer38
viewsProblems inserting an OBJ into a LIST
I’m doing a survey using the LIKE, in the MySQL with JSF. Whenever I will insert the search result inside a array to return to my JSF, the array add, but always overwrite items with the last…
-
0
votes1
answer62
viewsError running INTERSECT on Mysql
I want to select employees from the employee table who are managers, for this I’m trying to use the INTERSECT but it’s not working, I think the picture says it all too, there would be another way to…
mysqlasked 6 years, 5 months ago Nathan Silva 87 -
0
votes1
answer525
views(PHP) What variable do I put inside mysqli_affected_rows
<?php $conexao = mysqli_connect("localhost","root","","banco"); $nome = isset($_REQUEST['nome'])?$_REQUEST['nome']:""; $telefone =…