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
answer71
viewsWhat is the importance of using ON DELETE CASCADE and ON UPDATE CASCADE in a table with foreign key(s)?
I wanted to know why it’s important to use ON DELETE CASCADE and ON UPDATE CASCADE in a table with foreign key(s), especially when there is Rigger in it(s)?
mysqlasked 4 years, 4 months ago user198162 -
-1
votes1
answer121
viewsSave last login via mysql and show who is online
I’m developing a project, which is actually already working. But there’s something I’ve tried a thousand ways but still can’t implement. I need to record each user’s login and logout dates/times in…
-
-1
votes1
answer49
viewsRevoke Mysql ALTER TABLE command specific privileges 5.6.44
I need to prevent a column from being removed accidentally while running an Migration in a Mysql database v5.6.44, so I thought about limiting privileges, but even removing the permission of "DROP"…
-
-1
votes2
answers36
viewsDelete only if there is - in the word
I would like to delete some useless records from my database They are, for example: -2046820062 -2046820165 -2046820183 In short, all records that start with the symbol - (less) of my data2 column…
-
-1
votes4
answers140
viewsError in PHP code of "Invalid Parameter number" in sales code that must restore or remove the quantity of products in another table
My code involves updating a PHP sale should perform two actions when updated: Make the total calculation of the sale in the table itens_venda(if the quantity column is changed, a recalculation is…
-
-1
votes1
answer74
viewsDoubt about alternative to decrease code size and make fewer queries
I have a question regarding a certain part of a system that I am developing. The system is for management of a higher education institution and has a page that is to administer the courses of the…
-
-1
votes1
answer45
viewsI was able to search 1 more query in the database with PHP
I’m trying to do a search in my code, searching other fields, for example, looking for people who were registered with the mother’s name " so-and-so", but I’m not getting a logic... I can only…
-
-1
votes1
answer21
viewsMake a relationship with data already created
I’m working on a school registration system with Alavel. It currently has two tables in the database: the list of Classes and the list of Teachers. When registering a new class, I want to be able to…
-
-1
votes1
answer42
viewsQuery in 2 Very Slow Tables in mysql
SELECT scanlators.* FROM lista_de_capitulos INNER JOIN scanlators ON JSON_CONTAINS(lista_de_capitulos.scanlator, scanlators.id) GROUP BY scanlators.url ORDER BY COUNT(lista_de_capitulos.id_manga)…
mysqlasked 4 years, 1 month ago Gabriel Henrique 1 -
-1
votes2
answers45
viewsHow to display text at a certain mysql time
Good evening, my compliments, I have a php system with mysql, could someone help me with my question? My site displays data from companies in frontend. The open and closed time data are in the…
-
-1
votes1
answer144
viewsMy Springboot Java EE application does not recognize my Docker mysql container
Good afternoon, For study purposes, I created a java application using Springboot and am trying to set up a mysql database that is hosted on Windows Docker. However, even with the container running…
-
-1
votes1
answer59
viewsWhich country had the largest total population each year
I created this table: CREATE TABLE `Populacao` ( `ano` int(11) NOT NULL, `pais` varchar(2) NOT NULL, `popM` varchar(10) DEFAULT NULL, `popF` varchar(10) DEFAULT NULL, ); Where popM is the male…
-
-1
votes1
answer245
viewsMysqli INSERT error
I am not able to identify the error. I have always set up structures like this, but now this error appears. Parse error: syntax error, Unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or…
-
-1
votes2
answers47
viewsThe date of a sale changes when the record of the sale is updated
The column data_venda TIMESTAMP(0) of my table venda returns the current time of sale on my sales registration form. Only on an update form where I update the sale schedule changes, and I didn’t…
-
-1
votes1
answer46
viewsSave several values in the field of the mysql table
I wanted to find a way to save, for example, the codes of some doctors who participated in a consultation of an animal. I would like to keep more than one veterinarian in the consultation. (as many…
-
-1
votes1
answer26
viewsQuery return in which field is the value
I have a query in PHP + Mysql: SELECT * From tb WHERE campo1='valor' or campo2='valor' or campo3='valor' I would like the query to return to me in which of the fields was found the value.…
-
-1
votes1
answer48
viewsUpdate by value difference per id
I am trying to perform an update through this select, where I see what are different data from the pen_registration table, but when trying to perform an update, it presents errors: [MYSQL] UPDATE:…
-
-1
votes1
answer31
viewsPerformance - Separate log tables or leave them in the same database
everything jewel? I have a mysql database approximately 180mb in size. Each month the application automatically creates a new table with access logs and actions, which in 14 months are totaling 80mb…
-
-1
votes1
answer189
viewsSeparating a String without defined delimiter
I need some help, I have a String ex: 95YAH0T01MJ456348 - this String will always contain 17 digits and the String must always be separated in the first 6 digits so you can pick up and make a…
-
-1
votes1
answer77
viewsSelect TOP 3 of every month
I need to return the top 3 of a query each month: select distinct mes, rubrica, count(*) qtd from boletins group by mes, rubrica order by mes asc, qtd desc; This query above returns about 30 lines…
-
-1
votes1
answer82
viewsProblem creating SQL INJECTION security
I have a PHP function where I pass the data to it and the same gives an UPDATE in the data. however I am doing security against SQL INJECTION, only that it is not working what would be the problem?…
-
-1
votes1
answer28
viewsCreating view in Mysql
I have a structure for view in the database. And when executing, the error is that c3.nome does not exist. But exists in the database, I believe it is on account of subquery. How to proceed? SELECT…
-
-1
votes1
answer49
viewsData search
good guys to with doubt here and I want to do the following in jsp I want the client to type One word to search mysql database example Eonardo then I will have several registered names of the…
-
-1
votes2
answers44
viewsMysql table return with PHP foreach
I have the event table and would like to return all rows of a Mysql query through the foreach in PHP, but it returns only the first line, can help me? Follows the code: <?php…
-
-1
votes1
answer28
viewsHelp with Foreign Key, Mysql - Xampp
Mysql database Question 1: I’m trying to delete a Foreign Key and it’s making this mistake: #1044 - User denied '@' access to the information_schema database' Code: alter table informacoesproduto…
-
-1
votes1
answer40
viewsMultiplication of Values
I have a product sales system In this system the user selects the product in a Combobox, after selecting the product the field Unit Value (Textfield) is filled automatically with the value that was…
-
-1
votes1
answer45
viewsSelect to calculate all records and total record by one condition
I have a sales table per user, which connects user_id, product_name and sales value. I would like to make an inquiry to return how many products were sold per user and how many products with more…
-
-1
votes2
answers48
viewsHow to Get the value of a multiplication?
System made in Vaadin + Java + Springboot + Maven + Mysql I have a sales system, where the user chooses the product he wants to buy in a Combobox, sets the amount he wants to buy (Numberfield), when…
-
-1
votes1
answer22
viewsMysql - How to select previous month’s records?
Hello, I’m trying to select the 'Customers' table records that were registered last month. In this table there is the field 'Createdate' (datetime). I’m trying to do it this way but it’s not just…
-
-1
votes1
answer23
viewsOperation of datiff in SQL 2014
I have an accumulated base of dates in sql, I wanted to select all dates you have from the current date (today) until 60 days ago, but I’m not getting the code right. ***select data CPF, sum(risco)…
-
-1
votes3
answers42
viewsDoubt with GROUP BY - MYSQL
I am making a query to my database, where it returns me several lines and groups so that I am shown only one. However, there is a column called "validated", with most values defined as "Yes". I…
mysqlasked 3 years, 5 months ago Eric Vinicius 9 -
-1
votes1
answer41
viewsHow to view the latest record stored in the mysql database in a Java Swing interface?
I want to display in the java swing graphical interface the total number of users registered there in my database Look what I tried He of error null public void restt() { String sql = "select…
-
-1
votes3
answers64
viewsHow to filter only numbers with 'Like' SQL
I have a table in which the field mainUnitId has the following data: Ad23 Ad7 Ad11 Ad9 Adv1 Adv14 Adv21 I need to bring in the search only those who have Ad + numbers after My code: SELECT * FROM…
-
-1
votes1
answer30
viewsError Call to a Member Function store() on string - image upload error
I’m trying to make a upload of images using the public function create, but when I try to send the form to register the error appears: Error Call to a Member Function store() on string Does anyone…
-
-1
votes4
answers2232
viewsSelect option selected
I need to leave the select option selected according to the field saved in mysql. The form is to edit so it displays the fields available with foreach. Ex: <select name="segurado" > <option…
-
-1
votes0
answers7
viewsCould not find SQL driver
I give php Artisan serves and open localhost and return me: Illuminate Database Queryexception could not find driver (SQL: select * from sessions where id = 9MOM8bvIrofrPuP9POR5BpWIfDXFXkk0fd8jPDHT…
-
-1
votes1
answer38
viewsPymysql - What is . cursor() for
I am learning database through Pymysql in Python, but many videos only talk about how to do but do not speak because... I wanted to ask what . cursor() in Pymysql is for?
-
-1
votes0
answers10
viewsProblem with connection between Java and Mysql using Hibernate
Hello I am trying to make a connection between Java and Mysql, and this appearing the following error: ago. 13, 2021 10:55:09 PM org.hibernate.jpa.internal.util.LogHelper…
-
-1
votes1
answer29
viewsSQL Server - Function to format date field with Convert command
I have the following function: select convert(DATE,GETDATE(),101) Where she returns to me as follows: 2021-08-17 I want him to return me a data with this format "17/8/2021" keeping the data as date.…
-
-1
votes0
answers9
viewsI cannot save password encrypted with bcrypt in the database
I encrypt the password with bcrypt and when I will enter in the database it just won’t go but if I put anything else works what I can do ? $senha = \DarkDevs\Bcrypt::hash($senha); $registro =…
-
-1
votes0
answers15
viewsI installed Mysql Workbench in Ubuntu but I click on the local server it gives this message of the figure below. In the terminal I can see the database
Guys I’m having a problem with my Ubuntu in the database. Someone to help me ? I installed Mysql Workbench but I click on the local server it gives this message of the figure below. However in the…
-
-1
votes0
answers15
viewsSeparate DDD from phone with HIVEQL
I have a table with fields DDD and Phone. Some were registered correctly, others the ddd is next to the phone and need to separate. CURRENT TABLE: UPDATED TABLE: I am starting my studies in HIVEQL,…
-
-1
votes0
answers25
viewsDelete PHP Record
Good morning, I need to delete a record and 2. Ex. I want to delete the record with ID 1 and the next 2 (2 and 3), how do I do this? I have only Cod to exclude the main (1) $stmt =…
-
-1
votes0
answers37
viewsError SQL Syntax
I’m trying to edit a table in my database and create a fk Query: ALTER TABLE `tcc`.`usuarios` ADD INDEX `fk_playlist_idx` (`id_playlist` ASC) VISIBLE; ALTER TABLE `tcc`.`usuarios` ADD CONSTRAINT…
-
-1
votes0
answers6
viewsJAVA programming and MYSQL connection / database
I’m new here. I would like to know which languages indicate for start, such as dev front end. Where to program java / mysql
-
-1
votes3
answers405
viewsSelect only latest Mysql Chat messages
I’m creating a chat on an android app and I need to display this screen: My database looks like this: Table messages: I am making a this example query for the user who has id=43 SELECT m.dono,…
-
-1
votes3
answers417
viewserror insert data into php database
I am making an html page with the checkbox to insert in string form inside a table row, however if I do not mark all options it gives an error (but inserts in the database), how do I make this error…
-
-1
votes2
answers110
viewsDelete multiple Rows using php and mysql checkbox
I want to delete the Rows that I select with my checkbox and delete also in the database so that is giving pq in this part of the code : <?php include "conexao.php"; if (isset($_POST['sel'])) {…
-
-1
votes2
answers5049
viewsCheck if record exists in the table and return in mysqli
Hello I have a table called logs id | usuario_id | produto_id 1 | 10 | 20 2 | 10 | 30 3 | 20 | 30 4 | 20 | 20 They are logs stating that the user with id 10 has already seen the product with id 20,…
-
-1
votes3
answers1112
viewshow to create search system using filter
I have a search system where I search users filtering by: name, age and email. If I filter by name and age and email, everything happens well, but if I filter only by age, for example, nothing is…