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
votes2
answers78
viewsDoes not connect to database and returns no error
Hello, I made my site by xampp in windows, when I went to migrate to ubunto I realized that simply mysql did not work, and nor returned any error, for example, in the initial page of the site I…
mysqlasked 7 years, 8 months ago Lucas Caresia 2,663 -
0
votes1
answer75
viewsFine-tuning Ranking for a Game System
I have a very crazy problem that has already burned my logic ability. A while ago I posted a question almost like this but and they helped me a lot (I really appreciate it) but my need changed and…
-
0
votes0
answers71
viewsQuery with sql does not return when using WHERE
I have a query that should bring the name of users who received a message sent by a user: SELECT msg.msg_content ,usr.user_name FROM message AS msg INNER JOIN usuarios AS usr ON msg.user_id_out =…
-
0
votes1
answer605
viewsSum mysql decimal values
I made a query that adds a decimal field, only I’m having trouble, because when I put the clause group by t1.id_sell it lists me sales but no longer sums correctly and without the correct sum clause…
-
0
votes0
answers74
viewsHow to show informative message to user and follow flow for BD recording
I am having a difficulty that I am not able to solve, before registering an information in my BD I do a check to see if what the user is trying to do is allowed, in my case a given contract needs to…
-
0
votes0
answers364
viewsTraverse all strings by delimiter in the field and generate a column with the result
SET @contador := 0; SELECT SUBSTRING_INDEX( SUBSTRING_INDEX("BOX 01;BOX 02;BOX 03;BOX 04;BOX 05;BOX 06;BOX 07;BOX 08;BOX 09;BOX 10;BOX 11;BOX 12;BOX 13;BOX 14;BOX 15;BOX 16;BOX 17;BOX 18;BOX 19;BOX…
-
0
votes1
answer253
viewsMaster detail table, totalizing fields
I am doing a service order control where in a service order several users will register products and labor, so I have three tables: - Order of service (master) - Products (detail) - Manpower…
-
0
votes1
answer78
viewsGroup mysql data
Given two tables groups and processes. Where each group can have 0 or N processes. What is the best way to get this crossing. Grupo -------- id Nome bol_ativo = S Processo ------- id numero ativo =…
mysqlasked 7 years, 7 months ago Israel Zebulon 1,758 -
0
votes1
answer684
viewsShow lowest value in Mysql
I’m making a BD that shows the lowest value between three options, each option represents a column. I want to take the smallest value of a line where it contains these three values.
mysqlasked 7 years, 7 months ago Joana CRISTINA DA SILVA 1 -
0
votes1
answer904
viewsHTTP request limit and SQL queries
I am developing a system that will have a large amount of requests and would like to know the opinion based on your experience. 1) A server running apache with php and 64GB of memory, would it…
-
0
votes2
answers74
viewsRetrieve data from the database
Good is the following I have the following code: <?php $verifica = mysqli_query("SELECT * from dados WHERE login='$login'"); $array = mysql_fetch_array($verifica); $array[senha]; ?>…
-
0
votes2
answers49
viewsDatapicker Mysql
How to take the value that is in datepicker and do a search in the database? I tried this way but it is not correct var cmd = new MySqlCommand("SELECT distinct id, Pedagio, Carro, Placa, Fabricante,…
-
0
votes0
answers40
viewsWhat is the best way to generate PDF with PHP?
Currently what is the best way to generate PDF with PHP using HTML or database? I’ve been looking at some libraries, but a lot of them have no documentation or are obsolete. The very one PHP has…
-
0
votes1
answer91
viewsError connecting to Mysql using EF6
I’m getting the bug 'System.Data.Strongtypingexception: The value for column 'Isprimarykey' in table 'Tabledetails' is Dbnull Whenever I try to connect to a Mysql database using Entity Framework 6.…
-
0
votes1
answer440
viewsSelect Union same table
Could anyone help me with this problem? The query below throws the following error: #1054 - Unknown column 'u.idocorrencia' in 'Where clause' SELECT DISTINCT * FROM( (SELECT o.*, u.nome AS…
-
0
votes1
answer165
viewsDisplay return of an SQL query in Excel
My question is divided into two parts. The first, it is possible to perform SQL command by Excel, because I need to display certain information from my Mysql database in an Excel table. Observing: I…
-
0
votes1
answer93
viewsSelect conditional that takes value from another table
I need to make a conditional select that checks a sum performed that way: select round(sum((`gin`.`Caixa_9L` / 1000)),1) AS `total` from `gin` If this sum above is = 0, I need to take a value of a…
-
0
votes2
answers51
viewsDate range in other date range
I have two columns of the kind DATETIME: one is called dateHoraSaida and another dateHoraReturn into a table called trip. I would like to enter two dates (a break) and know if there is already any…
mysqlasked 7 years, 7 months ago Matheus Moreira 3 -
0
votes2
answers48
viewsHow to show only the completed data of a query to the database
In my script, I do the query, but there are some fields that are empty and in foreach empty spaces. How do I only take the data you have filled? <?php $consulta = $pdo->query("SELECT * FROM…
-
0
votes3
answers241
viewsHelp with Subquery in SQL?
I have in my system a table called Agendas, this table is linked with other tables Class and School through the columns turmas_id and escola_id. What happens is that the column turmas_id is not a…
-
0
votes1
answer150
viewsRegister changes in Mysql
Precise record all changes in the database, as UPDATE, INSERT and so on, so that I can restore the last backup and run queries from the last backup, manually deleting the unwanted wishes. I read…
-
0
votes1
answer38
viewsResult with repeated records
Good afternoon! I’m making a query, but the result is bringing repeated occurrences. there is some command for the query to only bring a record of each column? follows script: SELECT * FROM…
-
0
votes0
answers107
viewsServlet to add Contacts in mysql does not work
I have an html uploading request for a servlet which answers with error but when I have a class rotated testaAdicionaContato. mysql 5 table: create table contatos ( id BIGINT NOT NULL…
-
0
votes1
answer34
viewsIdentify 3 equal results in 3 different BD mysql
I have a php application that I have created that I list several ips, on some sites that I use, I would like to list the same ips on 3 sites in a single list! How I Do? Major Problem: Database…
-
0
votes1
answer216
viewsSelect an ID of a radiobutton query and store it in a session
I’m having trouble picking up an ID from a query using array and storing it in a session to use it on other screens. Any help I thank.Dry the code below Order Screen <!DOCTYPE html>…
-
0
votes1
answer581
viewsField help to save a link
I need to save a link in the database, which in the case is Mysql, I was using VARCHAR(255), but I easily noticed some of the links stored exceeded 255 characters, what kind of data can I use in the…
-
0
votes1
answer76
viewsHow to make 1 query and distribute the result spread by the code?
Well I have a site where I am to each area using a select , I think I’m making more queries than I should, is there any way to repeat the result ? follows a picture of what I am proposing <?php…
-
0
votes1
answer245
viewsError changing charset using Mysql Table Editor from latin1 to utf8
I am trying to change the charset, of a table directly in the database using Mysql Table Editor, from latin1 to utf8 however, by selecting utf8 in the charset options it automatically changes the…
-
0
votes1
answer510
viewsHow to decrease the amount of if
The code below should do the following things: 1 - Search the companies in the database. 2 - Search the table in the month which companies will be worked. 3 - This table of the month is pulled that…
-
0
votes2
answers79
viewsComplex wp_query
I am setting up a schedule of events in Wordpress and need to list all the events of the week grouped by current day. I have events that last only one day and others that last all month. I created…
-
0
votes1
answer1510
viewsFatal error: Uncaught Exception 'Pdoexception' with message 'SQLSTATE[42000]'
I need to generate a schedule for a certain period, but it’s making this mistake. Fatal error: Uncaught Exception 'Pdoexception' with message 'SQLSTATE[42000]: Syntax error or access Violation: 1064…
-
0
votes0
answers27
viewsHow to dynamically overwrite a variable when making a loop in a query?
I have a variable $x = 0 and the $y = 10 in the following query: select * from tabela limit 10 offset 0 This query makes a loop, more it would need in that loop the value of the offset increase +10…
-
0
votes2
answers294
viewsRule for redirecting with parameters
I’m trying to build a friendly URL system but I’m having the following problem: I have a page that has a list of several items. The page has this URL: http://localhost/personal/portifolio When the…
-
0
votes0
answers35
viewsInsert into Mysql txt file
I’m trying to insert a C# table into Mysql. For this I am using a txt file filled with table information and then inserting in Mysql, but it does not insert even though the file is created…
-
0
votes2
answers586
viewsSelect All NULL and NOT NULL Records
I have two tables: Medals and Loja_medals. I want to bring in just one SELECT all medals and create a column to put your situation. Would be two status, Yes and In the. The structures: MEDALS ID…
mysqlasked 8 years, 8 months ago Diego Souza 16,524 -
0
votes2
answers842
viewsAverage per hour Mysql
Hello, I wonder if you could return only the averages per hour of a table as below: id | valor | timestamp | 1 | 5.4 | 2017-4-20 18:00 | 2 | 3 | 2017-4-20 18:01 | 3 | 2.8 | 2017-4-20 18:40 | 4 | 2 |…
-
0
votes0
answers141
viewsPing in PHP + Debian Apache2
Good morning, I managed to search the internet make the script below work as what I needed, but still lack a detail,ai I have to consequently drip into a machine,as I could do to be a list of…
-
0
votes1
answer329
viewsMysql - Linux installation problems
Problems with installing Mysql on a linux. Every time I put the remote in the terminal: sudo apt-get install mysql-server Return this message to me: Reading package lists... Done Building dependency…
-
0
votes1
answer61
viewsMysql - Search using like does not correctly return Unicode characters
I have a text editor in my application that records html formatting in a longtext field. It happens that when I use the like to return the data it cannot find because of the generated Unicode…
-
0
votes0
answers156
viewsInsert data from a while mounting the form into the mysql database
how to take the value of inputs that comes by array because it is the form is fed by the client follows the form code, hence how many questions he wants in my poll system, and creates the answers..…
-
0
votes1
answer521
viewsHow to Import CSV File to Mysql? Error 1295
How to import a CSV file to Mysql? I get error code 1295: ERROR 1295: 1295: This command is not supported in the Prepared statement Protocol yet SQL Statement I sent the command: LOAD DATA LOCAL…
-
0
votes1
answer4362
views1264 Out of range value adjusted for column with decimal field
I have a hotel table in my database with a column estrelas(decimal(1,1)) which receives the hotel grade (from 0.0 to 5.0), however whenever I try to insert or change a field and put a value greater…
-
0
votes1
answer105
viewsphp database modeling doubt
I’ll make a system for a colleague so I’m doubtful how I model the database I have a table with tbl_leituraAtual tbl_leituraAnterior tbl_consumo tbl_factorCorrecao = tbl_total how do I make this…
-
0
votes1
answer63
viewsAdding up hierarchy points
My goal is to create a multi-level marketing system, with two teams. Left Team and Right Team I’m having trouble keeping score. My table looks like this: id_user | sponsor | leg( 0 left , 1 right) |…
-
0
votes1
answer804
viewstransfer from one database to another
Hello guys I am developing a real estate site, however it already exists or I will just update it, my doubt is whether it is possible to transfer the properties already registered on the old site to…
-
0
votes1
answer164
viewsError passing value in variable Where clause in SQL in ASP
Follow the code below Even if the id items exist ... swipe through and only show the value of the variable3 What am I doing wrong ? <% variavel1 = LCase(Request.ServerVariables("URL")) variavel2…
-
0
votes2
answers918
viewsUse id for auto-no-increment insertion
In the MYSQL I have a table of subscribers where the primary key is the registration number which is a column that has no auto-increment, I can’t change that. I made, in Codeigniter, a method that…
-
0
votes1
answer40
viewsSelect Mutiplos Mysql
I need to search data from one table and complete with data from another table... Main table: agendaphone Secondary table: neighborhood principal:…
-
0
votes1
answer1043
viewsHow to make a Submit with <button type="button">?
I have created some and need them to perform the same functions (with database) of how to register, change, etc. Can anyone help me or explain how to do this? Thank you !
-
0
votes1
answer41
viewsKendo Grid Remote XML Data
I have a WCF that returns the data from a remote Mysql database, the return is a simple XML, I believe because it is a simple XML is not populating my Kendo grid. I would like an example to assemble…