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
-
1
votes1
answer86
viewsHow do I make a case when no load data infile?
I need to make a replace from the same column of several distinct strings, make a load data infile. Except that there is a syntax error on line 12 where the first case is, someone knows what I’m…
mysqlasked 8 years, 4 months ago Humberto Costa 21 -
1
votes1
answer294
viewsselect unique name in mysql table
Well, I have a constant doubt when selecting something in mysql, I have a mysql table that contains a column called Name in it contains the following values |name |Aline |Alice |Aline |Valdemord…
-
1
votes1
answer81
viewsSelect and add records from a table with different fields
Good afternoon guys, once again I come to ask for help! I have a table with the games held and the scores, I need to show how many games have been played and the number of goals suffered and…
-
1
votes1
answer931
viewsComposite Key Table without repetition
How do I make a table with composite key, but I can’t repeat the combination of values. I want to store FRIENDSHIPS, using a syntax similar to is: tb_amizades id_usuario_um id_usuario_dois SELECT *…
-
1
votes1
answer272
viewsHow to insert only elements that do not exist?
I have a script in python that searches elements of a database and saves in another, so when I run the script it is duplicating the data. sql = "INSERT INTO `alarm` (`data`, `seconds`, `culprit`,…
-
1
votes0
answers16
viewsCounter using update in Wordpress
I’m trying to create an accountant, but the code is not increasing one more, could help me? $wpdb->update('QuantidadeTestes', array('QtdTeste' => QtdTeste+1), array('idUsuario' =>…
-
1
votes1
answer84
viewsTable comparison
I am creating a pool system, where the administrator registers the games and the score, and the user has the option to kick a score, in case this score is equal to the registered by the…
-
1
votes1
answer375
viewsSubquery Returns more than 1 Row Mysql
Follow the code below that is causing the error quoted in the title: select (select id from message where user_from = tempMsg.user OR user_to = tempMsg.user) as id from tempMsg How can I fix it?…
-
1
votes1
answer65
viewsMysql Error - Stored Procedures
I am creating this process to run once a day, as I have no experience, I got an error in the code below: CREATE (definer omitido) PROCEDURE `MULTAOFF`() BEGIN set @multado = (select `CPFAluno` from…
-
1
votes1
answer569
viewsInsert array foreach
am tend a problem when entering data in the database with php , I have a form with several checkbox , then I want to select more than 1 checkbox and insert in the database , I did so form <input…
-
1
votes2
answers475
viewsSelect to Schedule in Mysql Meeting Room
Here is the problem: I’m creating a system for scheduling meeting room. I would like to assure you that it will not be possible to schedule the same room for the same period. So after filling out…
-
1
votes0
answers55
viewsDUMP Mysql based mto large (Blobs)
I need to make a DUMP of a giant base, it has more than 500.000 Pdfs files uploaded into it in a field BLOB. It is possible to make a DUMP from such a base and restores it smoothly? If yes, how to…
-
1
votes3
answers536
viewsHow to Block a button
I have a system where you have registered matches and the logged in user tries to match the results of these matches. Each match has a id registration that is with the name (game) in the database.…
-
1
votes1
answer128
viewsMysql cleaning of logs
On my Mysql server the myaccess.log file located in Mysql/logs/ is of a large size, around 30GB. I would like if possible to reset this file, but I need to make sure it doesn’t compromise database…
mysqlasked 7 years ago Lucas Spielmann 152 -
1
votes1
answer22
viewsBecause my project is not being accepted, I am using mysql6.3
create procedure cadastrar_nadador (out nome_v varchar(80),out sexo_v varchar(1),out nascimento_v date,out patrocinio_v varchar(80)) begin insert into…
-
1
votes0
answers69
viewsUser deletion system by the user himself
For some time I’ve been trying to develop a system of account deletion by the user, like what we see on facebook and twitter where in the user’s settings, the same can choose to delete your account.…
-
1
votes0
answers89
viewsAutomate logging into the database
Hello, I’m developing a system in which I need a list of all the football teams in the world and their respective championships. I have the following structure in my database: tb_time(id, name,…
-
1
votes1
answer80
viewsMultiple Mysql Banks?
Good night. I’m creating a PHP system that looks like a virtual shopping mall (several "stores" and each store with its products). For this I need to store data from users, stores, businesses,…
-
1
votes1
answer330
viewsWhile returning duplicate data
Good morning Guys, I have this query $query = "SELECT p.*, c.nomeCategoria AS categoria FROM produto AS p INNER JOIN produto_categoria AS c"; $dados = mysqli_query($con, $query) or…
-
1
votes0
answers78
viewsHow to Return a Stored Procedure - Mysql
I’m making a login screen, but I can’t return the selected user ID. DELIMITER $$ USE webnote $$ CREATE PROCEDURE login (IN email2 varchar(60), senha2 varchar(16)) BEGIN if EXISTS(select id_aluno…
-
1
votes1
answer38
viewsConsultation with combined criteria
I’m trying to assign more than one search criteria in the database and I can’t find anything that can help me. I’ll explain it better: I have a database with a "city" field, where I want the daos…
-
1
votes3
answers227
viewsHow to store the number of rows found from a Mysql query in a variable
I have a Side Menu on my page and I want to display an alert text to the user, indicating when they have new messages and how many of them. For this I made the query in BD and it returns me…
-
1
votes1
answer154
viewsNotifications in Android app
I am developing an application and would like to know how I do to generate notifications when there is a new record in the database, I am receiving the data via JSON. I was watching Firebase, but I…
-
1
votes1
answer38
viewsQuery to get all records regardless of whether they exist in another table or not
I’m running an app from a store where users can leave equipment to be fixed. So I made a php to search by name those users who have already left some equipment: $sql = mysqli_query("$conexao, SELECT…
-
1
votes0
answers517
viewsCreating Event in MYSQL to delete records per day
I’m trying to create an automatic event in Mysql so that every 24 hours it runs the following command to delete promotions without admin interaction, where if the end date is shorter than the…
-
1
votes1
answer390
viewsGet the id of the maximum value
In a Mysql table id valor 1 5 2 15 3 7 I want to take the value of the "id" that has the highest value in the value field. I want to return in this case the value 2.…
-
1
votes1
answer375
viewsPrint only selected records at checkbox
I have the following table, but I’m not sure how to use the checkbox, ? And since he’s inside the table he’s showing up in print,. <table class='datatable table table-hover table-bordered…
-
1
votes1
answer170
viewsError running Trigger mysql
Good afternoon warriors, I’m having a problem implementing a Trigger in mysql. It turns out that I created a table called audit with the same structure of the main table of appointments, this table…
-
1
votes0
answers280
viewsCodeigniter3 / Mysql - Select List
Good morning Personal. I’m working on a code using Codeigniter, which has a registration form. This form has three Dropdown (State, City and Neighborhood), and the data are returned from the…
-
1
votes3
answers3666
viewsConnect Mysql C#
I have a MYSQL bank in a shared UOLHOST hosting, I can connect to the bank by Visual Studio Server Explorer normally: But when trying to connect through a simple test console application I get…
-
1
votes1
answer63
viewsProblem with RAND in SQL
I am using Mysql "5.6.38-log - Mysql Community Server (GPL)" I have a trial that runs every second, and in it has a validation with a RAND: WHERE t.auc_due_time < GREATEST(LEAST(TRUNCATE(12 *…
-
1
votes1
answer62
viewsHow to avoid performance problems with tables that contain a lot of data?
I am developing a payroll system, in which there is a "problem' in one of its tables. Because, to control the discounts on the holerite of each employee, I thought to create a table with the name:…
-
1
votes2
answers47
viewsWhen I do the UPDATE it saves in the database correctly, but when I update the page the data disappears from the database
I am trying to recover the data from a table inside an input where the user can be updated and save in the same table through UPDATE. I managed to do the UPDATE, but edit the data by input and send,…
-
1
votes1
answer101
viewsMysql case returning type blob
I created a search query in Mysql and using case within it. The problem is that by returning the value of the column that is of the whole type, the value comes with the answer blob. Follow SELECT…
-
1
votes1
answer107
viewssystem with 2 databases , returning empty mysql php queries
I have a system where I have a user base which is a unified base in a bank, and another base in the system. In my pages I call them so: <?php include("conn_user.php"); include("conn_sys.php");…
-
1
votes2
answers183
viewsLIKE does not work together with BETWEEN
Something wrong with this query? It is showing all the data without any filtering. But when I take the LIKEs It works or if I take the BETWEEN and leave the LIKEs it works. One works without the…
-
1
votes2
answers728
viewsHow to search for something in 100% of Mysql database
There is a Mysql query where I can search all the data of all tables in a database at one time? Equivalent to something like this: "SELECT todos_os_campos FROM todas_as_tabelas WHERE qualquer_campo…
mysqlasked 6 years, 12 months ago AnthraxisBR 4,361 -
1
votes1
answer104
viewsCondition in Mysql - CASE X = Y THEN Where - Is it possible?
I need to fetch the products from my site. In it, there are two types: Physical and digital. I would like if the products were physical, to show only those above 0 in stock. If it is digital, there…
mysqlasked 6 years, 12 months ago Maykel Esser 598 -
1
votes0
answers423
viewsMysql Trigger with more than one cursor
I have a Trigger where I have 3 cursors, but it only runs correctly one of them(soma_pointo_cursor), the other two run incorrectly, I’ve tried with three separate loops, and it didn’t work either.…
-
1
votes1
answer33
viewsWhat is wrong with this Mysql CREATE FUNCTION?
What’s wrong with create Function? I’m not finding out. Already of the error in the first line. CREATE FUNCTION SEQ_NEXT_VAL() RETURNS INT DETERMINISTIC BEGIN DECLARE retorno INT; SELECT…
mysqlasked 6 years, 11 months ago BicaBicudo 121 -
1
votes1
answer159
viewsPHP, marking checkbox for printing
I’m in the following situation, and I was wondering if you could help me. I have a page where I mark checkbox and send to the printing page. But I’m not getting the loop, for the code to see each id…
-
1
votes2
answers39
viewsDate help in order printing
I have a field in the table that is defined as dtConcat2 timestamp CURRENT_TIMESTAMP and in the insert it takes the date from the server and writes in this field, the problem when I print the…
-
1
votes1
answer1043
viewsProblems when passing ID to MODAL window
I have a page with a table that lists the necessary information and in it several buttons like delete, change, view. The problem is that when I click on visualize (calls the MODAL) it should list a…
-
1
votes0
answers45
viewsGroupby making query get very slow
Good afternoon guys, I’m making a query in the bank where everything goes well, however when I use the "groupby" this query is very slow, very slow even, example, just take the line of the groupby…
-
1
votes1
answer667
viewsHow to land % to integer on google Harts
I got this Chart: In the visible part this percentage, as I do to change the percentage by the whole quantity: Example: As shown in the attached image instead of showing 14.3% show 1. Follows my…
-
1
votes0
answers173
viewsError trying to import database into phpmyadmin
I am migrating a wordpress site from one server to another. I created a new Mysql database on the new server, but by clicking "import" I get this message. How to solve?…
-
1
votes0
answers133
viewsMonitor Mysql server activities
I have a network-hosted system (php and mysql) here in the company, installed on several stations. I wonder if there is any command or tool for monitoring requests (queryes) for made to the MYSQL…
-
1
votes1
answer70
viewsHow to store questions and answers in the bank
How can I store questions in this style: a. __She__ is alone in the park, sitting by__herself___. (She/Her/Herself) in the bank with these spaces to fill and use these spaces on android for example.…
-
1
votes2
answers1168
viewsQuery of many Mysql and PHP data
Personal the code below parses the data that is in the openvpn log and stores in the database that by other codes are shown on a table page. But that’s a lot of records in a log file! There are more…
-
1
votes1
answer271
viewsSelect with MYSQL when it exists in one table and not in the other
I have two tables: QUIZ QUIZ_GERAL I would need to list data from both tables when: The logged in user ID is equal to the IDCONTA field OR When there is a row in the QUIZ table and there is no row…