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
-
4
votes1
answer1037
viewsConsult ID in database ignoring scores
I have a mysql database where I need to make a comparison of registered Rgs with another provided by the user through an input, to see if the same ID is already registered in the database. The…
-
4
votes4
answers2981
viewsSQL Query Joining 5 tables
I need help to do a query (multiple relationships) on my Webservice + Mysql to return the result on my Android app. I have these respective tables: Query I need to query a person(tb_suspect), with…
-
4
votes2
answers2266
viewsPublish application with Entity Framework + Mysql
I’m using the Entity Framework for Mysql. I installed the .Net Connector, and the MySQL.Data.Entities. Locally it is working normally. But when I go up to the LocaWeb, will not. The following error…
-
4
votes5
answers26088
viewsRegistration problem (Column Count doesn’t match value Count at Row 1)
I am having the error "Column Count doesn’t match value Count at Row 1" when I try to register. I already checked my comic book and everything seems to be in order but nothing to solve this mistake.…
-
4
votes2
answers975
viewsMake a conditional update on ON DUPLICATE KEY
I have a query that takes the data from a . csv and inserts the data into the table. If the position is the same it updates the fields. I need that in addition to checking the position the query…
-
4
votes1
answer305
viewsCorrect syntax for SELECT and INNER JOIN in Zend
I believe it’s a simple question, but because I don’t know 50% of Zend I’m racking my brain, so here goes: $sql = $db->select() ->distinct() ->from(array('cli' =>…
-
4
votes1
answer164
viewsInvert 0 or 1 in a column
I have a table that has numerous records and a column called posição. It only gets the value 0 for locked and 1 for released. There now with a change I need to reverse these values, where this 0 has…
-
4
votes1
answer789
viewsTotal month to month with previous months
I need a SELECTthat brings the sum of data month to month and disappears with the total of the previous months. In the SELECT below is bringing the sum month by month. SELECT DISTINCT…
mysqlasked 9 years, 12 months ago Irio Broleis Filho 91 -
4
votes2
answers108
viewsUpdating Mysql table using sqlSave in R
I’m new to R and I’m trying to add new tables to the database,: Error in sqlSave(connection, dado, tablename = "teste", rownames = FALSE, : unable to append to table ‘teste’ Where: dado =…
-
4
votes3
answers30960
viewsHow to query in Mysql with two different conditions in WHERE
I have two queries that work perfectly separately, but I needed all their records together. Would be these: SELECT b.idBanca AS idB, b.DataHora AS dataHora, b.Sala AS sala, t.idTrabalho AS idT,…
-
4
votes4
answers10030
viewsMysql error 1054 Unknown column
I’m making an SQL that counts how many names in the table start with any letter but an error is being returned: Column not found: 1054 Unknown column 'A' in 'Where clause' To the following SQL:…
-
4
votes1
answer1056
viewsTracking and posting system (social network type)
I’m developing a new project and I’m creating a profile following system where the goal is to show only the publications of those I follow. Such as a social network. I follow the person, so I get…
-
4
votes1
answer1006
viewsNew row in table every 3 columns
I have a table that has to have 3 columns per row. The data of the 3 columns I take from the database. My problem is that when I display 3 columns, I want the next results to appear in the bottom…
-
4
votes2
answers201
viewsHow to save space in audit log?
I was creating a system that provides me data of my users according to the date I request, from X to Y for example. And the only way I could find for that was to create a table that way: date with…
-
4
votes1
answer95
viewsActivity has Leaked window Android
I make a connection with Mysql and it returns me a JSON that I play on a list of products. When I click on one of these items it takes the ID (I call PID in the code) of the product and sends it to…
-
4
votes1
answer553
viewsWhat is the maximum limit of PHP/Mysql/Nginx in a request before giving error 504 Time-out Gateway
And if possible how can I extend this time for large queries/requests?
-
4
votes2
answers12276
viewsWhat is the space limit of each database in mysql
I see that some SGBD's has a space limit set for each Database. As in the case of the Express version of SQL Server that provides 10GB for each Base. I would like to know if MySql has some limit,…
mysqlasked 9 years, 6 months ago DiegoAugusto 8,694 -
4
votes2
answers1848
viewsIs referencing the table itself in Mysql correct?
I am working on a system where the previous programmer structured a particular table of posts referencing itself (to be able to identify what would be the post comment) Sort of like this: Posts --…
-
4
votes0
answers599
viewsMariadb for when I have many hits on wordpress
I have a Wordpress site, used Mysql before in Centos, I decided to migrate to a Debian 7 with Mariadb, but when I have more than 30 simultaneous blog accesses, the database to. Go on down mine…
-
4
votes0
answers394
viewsPHP Class PDO works all CRUD on the local server when the select works
I have a problem that I could not solve. I have already researched here and found nothing like it. I have a PHP application, using the PDO class for database connection. So I got her the CRUD:…
-
4
votes2
answers2774
viewsMysql - make each row increment 1
I want to make an appointment sql and I want each row to have a column indicating the number of the ex row: linha nome 1 joao 2 maria 3 tiago . . . . . . n joares But this "row" column I don’t have…
-
4
votes1
answer996
viewsPHP hashtag system
I’m developing a hashtag system in PHP, and my question is this:: There’s how I make one SELECT publications based on the content? For example, the content saved in the database is: Hi, are you all…
-
4
votes2
answers106
viewsHow to not automatically sort IN(Mysql)
Run this SQL command: SELECT * FROM produtos WHERE id IN (144,140,134,133,128,129,141,143,149,150,147,146,126,142,125,99,100,92,91,90,108,109,123,124,122,121,110,89) ORDER BY none But the…
-
4
votes1
answer407
viewsASC and DESC sorting without losing variable value
I am trying to perform a sort of records on a page by firing a List/Menu, but by firing the same I am losing values of variables from a first selection. When entering the products page I already…
-
4
votes3
answers619
viewsDELETE FROM users WHERE user_id = $id
I have a script simple PHP+Mysql query: <table > <tr> <td ><h2>GERENCIAR ANUNCIOS </h2></td> </tr> <tr> <td > <table > <tr> <th…
-
4
votes1
answer1365
viewsCountdown in two tables
I’m having trouble counting items pertaining to neighborhoods. I need to list all the neighborhoods of the city X and show the items available cars and motorcycles. In the example I only used one…
-
4
votes1
answer240
views -
4
votes1
answer1280
viewsSave full path in the bank or just name with extension?
In the systems I used to develop back in the day, I used to save the entire file path in the database . Example: c:\xampp\htdocs\teste\imagens\post_44\stack_overflow.png // Image table imagem - id =…
-
4
votes2
answers501
viewsimport 1.2GB Mysql database
I’m having a hard time importing him into the process along the way. How long it takes on average to import a 1.2GB Mysql base into a linux-based Core 2 Duo?
mysqlasked 9 years, 5 months ago Ivan Ferrer 12,096 -
4
votes1
answer322
viewsWhat is the most efficient way to connect an Oracle BD to a Mysql BD
Having the following scenario: a simple telephony application "writes" in a Mysql BD and an Oracle BD needed from time to time to search for information in this Mysql BD. Someone already did this?…
-
4
votes4
answers4234
viewsConvert Mysql date (YYYY/mm/dd h:m:s) to dd/mm/yyyy
Check out my database: I’m using the following code: <?php $data = $noticia->data_cadastro; setlocale(LC_ALL, "pt_BR", "pt_BR.iso-8859-1", "pt_BR.utf-8", "portuguese");…
-
4
votes2
answers174
viewsHow to send queries simultaneously to test Transactions efficiency in Mysql?
I have a table Innodb in Mysql where I store a user’s account balance. To give a UPDATE on the balance I use Transactions to prevent two or more queries from trying to give UPDATE simultaneously and…
-
4
votes1
answer691
viewsKnow the JSON object name
I have a JSON and need to know the name of my object and the values it has, for example: {"Pessoas" : [ {"Nome": "Welson Play", "Idade":19}, {"Nome": "Stephanie", "Idade":15}, {"Nome": "João Pedro",…
-
4
votes4
answers3989
viewsHow to display 2 columns from 2 different tables in Mysql?
I have 2 tables with multiple columns. I would like you to display individual columns of more than one table at the same time: tabela1 | tabela2 Nome | Apelido…
-
4
votes2
answers509
viewsFormat Mysql Now() function return
So personal. I need to know if there’s any way to send only the H:i:s hours of the function NOW() in the database, or send the NOW() complete and then fetch only the time?…
-
4
votes2
answers21222
viewsSimple record editing with PHP+Mysql
Basically the three scripts should edit a record in the Database: php records.: <?php // Aqui você se conecta ao banco $mysqli = new mysqli('127.0.0.1', 'root', '', 'login'); // Executa uma…
-
4
votes1
answer6466
viewsAdd Mysql Time Field
Dear friends, I have a table with a TIME column, which stores the time worked on the day, and I am trying to sum up these times at the end of a month, but without success. I used the following…
-
4
votes2
answers8619
viewsPass parameter in View
How do I pass a parameter to a view in Mysql? Using SQL Server simply put WHERE u.nome = @nome that would solve the problem. Below is the view of the problem in SQL: CREATE VIEW `view_conta_pessoa`…
-
4
votes1
answer4734
viewsPick variable on another page
After fetching the data in mysql with php and displaying it on the page, I would like to know how to get these same results from this page where it is displayed and display them on another page.…
-
4
votes3
answers154
viewsOptimization of PHP functions for database querys
I often see different functions in PHP for each query. I wonder if there is any other way to do the following, in a connection with PDO: function get_user_data($table, $columm, $required) { $db =…
-
4
votes2
answers1050
viewsWhat better and safer way to program PDO?
Good personal I am now switching to PDO in php wanted your opinion to know if the method I am programming is safe and if I am programming PDO the right way because I saw on the internet several ways…
-
4
votes2
answers2708
viewsError "1146 table 'phpmyadmin.pma__tracking doesn’t exist"
This error prevents me from creating new tables and accessing the already created ones: Error: 1146 table 'phpmyadmin.pma__tracking doesn’t exist How do I fix this?…
-
4
votes2
answers2360
viewsHow to count number of records in a table?
I have a call table noticias, where every news has a id. I also have a table called comentarios, where there is the id of the news the user commented on. How can I count the comments for that news?…
-
4
votes2
answers620
viewsValidate xml file before updating database
I have a file upload system that when sending the xml file it sends the insertions and updates in the database, but if a file with the different structure is sent I get errors. I have already found…
-
4
votes4
answers174
viewsIs it possible to use PHP in a data-title field?
It is possible to use PHP within a field data-title? I have the following code: <div id="grid" class="m-row shuffle--container shuffle--fluid"> <? $result = $connection -> query("SELECT…
-
4
votes1
answer94
views -
4
votes1
answer92
viewsGrouping function miscalculating
I’m trying to write a python function that takes two vectors, eliminates duplicates in the first and adds the corresponding data in the second. Kind of trying to emulate the following Mysql query:…
-
4
votes1
answer4082
viewsRemove Mysql root after creating another user with all privileges
In this tutorial: https://www.digitalocean.com/community/tutorials/how-to-secure-mysql-and-mariadb-databases-in-a-linux-vps After creating a new user with the privileges I need, they recommend that…
mysqlasked 9 years, 8 months ago Gustavo Piucco 2,401 -
4
votes3
answers521
viewsWhere should I put FK?
I’m learning about the database when a question came up. For example, I have two tables: user (_iduser, nome, sexo, ect.._) login (_idlogin, login, senha_)) Have relationship 1:1. My question is…
-
4
votes2
answers7297
viewsHow to duplicate a MYSQL database?
Is there any way to duplicate a database on MYSQL by the execution of any query? I can copy a table with this code: CREATE TABLE table_2 AS SELECT * FROM table_1 But how to copy replicate a…