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
-
5
votes1
answer11274
viewsHow to insert data into two tables at the same time?
I need to make an insertion as follows: I have two tables TABELA 1 and TABELA 2 and a cadre form. This form has three inputs: input 1, input 2, input 3 The input 1 shall be inserted into TABELA 1.…
-
5
votes2
answers707
viewsMysql to Python 3 connector
I’m doing a project with Django and Python 3 but I can’t find the appropriate Mysql connector. The django.db.backends.mysql works, but only for Python 2, and I wanted to avoid using this version. On…
-
5
votes2
answers2138
viewsJava and Postgresql/ MYSQL encryption
Hello I’m having a question in my college project, in scope it says like this: "Users and passwords can be stored in the database, using the database’s own encryption." Is the crypt in both by…
-
5
votes4
answers64762
viewsMysql installation socket error
I am unable to uninstall or make Mysql 5.5 work on my Ubuntu Linux 14.04.LTS, every time I try to access it, I get the following message: ERROR 2002 (HY000): Can’t connect to local Mysql server…
-
5
votes1
answer3246
viewsHow to define predefined types in Mysql?
In the site I’m developing I will, for example, a registration form where the user should define their gender in a combobox (male or female). The table users in the database will have all user…
-
5
votes1
answer6498
viewsHow to Build a Webservice to Synchronize Android and Mysql Sqlite Database
I built an android app that stores basic information about a contact in Sqlite: Name, Telephone, E-mail, Address among others. I searched a little and from what I understood, what I can do is use a…
-
5
votes4
answers971
viewsSelect between dates in Mysql
Good afternoon, I have the following problem: I have a column DATA_ENTRADA date type and need a select to compare the DATA_ENTRADA and the "current date" ( ex: today is 28/08/2015, tomorrow would be…
mysqlasked 9 years, 2 months ago maycon rocha 63 -
5
votes4
answers6626
viewsWhat SQL command shows the maximum number of active connections to the Mysql database?
Which SQL command returns the number of active connections to the database?
-
5
votes2
answers7097
viewsHow to create a trigger in Mysql?
I have the tables usuarios, usuario_voto, and classificacao_usuario. Usuarios: system users table. usuario_voto: table that stores a user’s vote on another. classificacao_usuario: table that stores…
-
5
votes2
answers122
viewsHow to store form data in 2 different databases?
I have a form that data needs to be saved in a local bank and another database on a server. Is there any way to do that without duplicating the "Insert" code? In the connection file I configured the…
-
5
votes3
answers2046
viewsPost a comment and then display without refresh
Updated 5 Good morning guys, I’m trying to create a comment system like http://demo.hazzardweb.net/comments/ below we have the javascript code that sends the form and then adds the comment, it is…
-
5
votes3
answers833
viewsWith the ninth digit on the phones, how can I solve the problem of displaying 8-digit phones?
This was a question that came to me with the news of the ninth digit in the phones here in Brazil. I have in the system a list of phones that are saved along with the DDD. How could I do for an…
-
5
votes1
answer452
viewsCheck for data in column
Have a check to see if there is data inside a column in a table? I want to do a check and if there is data in the column it displays a div. I know the mysql_num_rows to add the data that was…
-
5
votes3
answers1909
viewsCapture Input ID
Anyone knows how I do to capture an input id and send it to the database? EXAMPLE I have this input: <input type="checkbox" name="adicional" id="Leite Ninho" value="2.00"> It has the name I…
-
5
votes2
answers923
viewsReport error while performing UPDATE with SQL
I have a project, in which the administrator can change registered data of tables, but if the query is executed, but no change occurs, I would like to return a message or error, here’s what I have…
-
5
votes3
answers22753
viewsError in select using mysqli_query
I made a php to list the rooms, but I’m having difficulty to list them, if anyone can help me, I would appreciate <?php $link = mysqli_connect("localhost","root","","hotel"); $result =…
-
5
votes3
answers1978
viewsCreation of a database for each user
I’m putting together a web sales system with php and mysql, where we will have several registered companies, each company being a user who will control their sales. Our team has a question: create a…
-
5
votes1
answer395
viewsRollback in specific table Laravel 4
I am manipulating a Mysql database with Laravel 4. I want to know if there is any way to do a rollback in just one of the database tables. For example, my Migration included the tables x, y and z. I…
-
5
votes2
answers8376
viewsConvert a positive decimal number into negative
I have the following query: Valor1 = '200.000,00'; select Valor1 from TB1 Is there any function that converts a positive number to negative?
-
5
votes2
answers1093
viewsDelete data from cascading table
I have some relationships on my tables and I’m willing to delete inversely. on my system the user will have the option to delete a category, here comes my question as I will do this because it…
-
5
votes2
answers658
viewsOrder consultation in the interim
I am trying to list a certain product category. example. $consulta = $pdo->prepare("SELECT * FROM msg where tema = :tema;"); $s = 'mensagens-de-aniversario'; $consulta->bindParam(":tema", $s,…
-
5
votes2
answers301
views -
5
votes2
answers30209
viewsMysql, types of comments
I had already realized that mysql, maybe not even the only case, but I would like an explanation on top of this to be more objective. I have several types of comments that are accepted: 1) -- ESTA…
-
5
votes3
answers160
viewsDo not fill in field if it does not exist
I have a question on how to ask a question to the database. Suppose I have two tables with slightly different structures Table1 id tipoA data 0 A '21/12/14' Table2 id tipoB data 1 B '24/12/14'…
-
5
votes4
answers58320
viewsError: Access denied for user 'root'@'localhost' (using password:NO) accessing Website
Good afternoon, I’ve been trying to run a website through a Raspberry to access with remote access. I installed OS Pipplware, along with Lamp and phpmyadmin. I sent through Filezilla the website…
-
5
votes2
answers64
viewsSELECT returning data not seen by a particular user
I’m having a hard time putting together Query I have 2 tables: video_visualizacoes with the fields visualizacao_id, video_id, conta_id (This field refers to the user who viewed the video)". videos…
-
5
votes2
answers731
viewsSQL - Double UPDATE with double Where
Next, it is possible to make two update-where together in the same consultation? I will explain, what I wanted to do is the following: UPDATE usuarios SET nome = "Matheus Silva" WHERE id = 1 AND…
-
5
votes1
answer186
viewsPerform random SELECT
I have a table where I always want to show a single record randomly. I’m doing like this: SELECT `id` FROM `tabela` ORDER BY RAND() LIMIT 1 I see that in this way the same records repeat a lot,…
-
5
votes3
answers596
viewsHow to select last related table records?
I have the following tables: negociacoes, negociacao_contatos and negociacao_status and the following relationships: negociacoes hasMany negociacao_contatos negociacoes belongsTo negociacao_status…
mysqlasked 9 years, 5 months ago Danilo Miguel 332 -
5
votes2
answers305
viewsWhy is this Resultset returning null?
If I run a query in the database returns result, however, when running java code, assigning the result to a Resultset, the same appears to be empty. You can help me? PreparedStatement ps =…
-
5
votes2
answers4670
viewsPosting system - "Duplicate entry '0' for key 'PRIMARY"
I’m having a problem, I’m not really sure if it’s in PHP or in the database. In a posting system using PHP, as soon as you post a news, the ID (the key Primary, which would be used so:…
-
5
votes1
answer446
viewsMonitoring Mysql database c/ Java application
I have a Java desktop c/DB Mysql application running in 100 company branches for more than 6 years. Today at headquarters we need some information from the branch database. I am developing a web…
-
5
votes2
answers111
viewsCombining column value with Mysql
I am working on a report in Mysql where I need to show a percentage of several events that occurred with a group of entities. The structure of my table is as follows: | id | eventoA | eventoB |…
-
5
votes3
answers747
viewsWorking with ID limit on large volumes
I have in mind some questions about large volumes of data on MYSQL, concerning the limit of ID. I will give as an example ID guy tinyint to simplify the explanation. In the example the field tinyint…
-
5
votes1
answer35
viewsFilter a field according to the text format
It is possible for me to filter the following formatting in a particular mysql field: (21)2222-2222. I ask for the understanding of colleagues if I was not clear in my doubt, because I had a problem…
-
5
votes1
answer174
viewsAdd data to a Mysql table with PHP. What’s wrong?
Initially, I’m new to PHP and SQL, so take it easy if you have shaving in the code. I’m just testing the PHP and Mysql integration, I took an example table from a book and made a quick html page to…
-
5
votes2
answers263
viewsIn a MVC structure, can we create a model that represents a View (SQL)?
I was arguing with a friend of mine about using views (I mean Mysql, not Mysql Pattern MVC). Hence a doubt arose in the following sense: A Model is used to represent a data structure, and you can…
-
5
votes2
answers1003
viewsCan Sqlite work fully offline?
I need to save my alarms so that after the device is restarted they are put back into operation. The problem is that I get all of them through my database on mysql. What made me think that maybe it…
-
5
votes1
answer433
viewsHow to detect Mysql changes in Nodejs?
Good night, someone has already used this package or knows a similar one that works? Link: https://www.npmjs.com/package/mysql-events Goal: launch an event when there is a change in the database.…
-
5
votes2
answers1455
viewsHow to create this rule in mysql
I have a field on my table: tipoEndereco char(1); But this field only receives two possible values, which are: 1-> i (Instalação) 2-> c (Cobrança) Because of that, I’m thinking, and I’d like…
-
5
votes2
answers174
viewsAdd consecutive fouls
I am creating an online diary module, I need to get students with 3 consecutive absences, follow the entry select, when the student has more than 2 hours of class, the select displays different.…
-
5
votes1
answer201
views -
5
votes2
answers1630
viewsModeling of a database
I created the following modeling: Would you like to know what can be improved? leading in good practice considerations for database? Explanation: In the TBLogin a person will create a login, which…
-
5
votes2
answers127
viewsHow to invert values that are comma separated in mysql
Photo of my base: The data is like this: -46.63642120299626,-23.54854965191239,0 I need to select so that they stay inverted: Ex: -23.54854965191239,0,-46.63642120299626 My selection in php:…
-
5
votes5
answers839
viewsHow can I add a value to a Row in the comic without having to add variables?
Well, here’s my question: I have the balance of a certain user Row from my database table that has 100€, and I wanted to add +50€, as I can do without having to create a variable with his current…
-
5
votes1
answer638
viewsfilter records by month
I have the following appointment: $sql= mysql_query("SELECT dia, GROUP_CONCAT(hora) FROM marcacoes WHERE colaborador_id = {$colaborador_id} GROUP BY dia "); Returns the following table: but I want…
-
5
votes1
answer8555
viewsDoubt in the relationship of Mysql Workbench tables
Hello, I have a small problem creating a database. My goal is to create a table to mark the attendance of people in the classes of the courses in which they are enrolled. The presecas table must…
-
5
votes1
answer396
viewsMigration dbExpress to Firedac
I’m migrating a system dbExpress to the Firedac, the system is in three layers (multtier), changed the components on the server side of SQLConnection for FDConnection, and the SQLDataset for…
-
5
votes1
answer625
viewsHow to update fields with fields from another table?
I’m not able to update one table with another’s select. I have a table mdl_user which contains several columns and created another users_sg to copy some columns. I copied with INSERT INTO users_sg…
-
5
votes1
answer537
viewschange output type to currency
I have a code that gives me two columns, Expense and Total, what I can not get is that in the output of the totals it gives me in currency format (R $ 1,000,00). the code is this: SELECT nome_evento…
mysqlasked 8 years, 3 months ago Roberto Gomes 455