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
votes1
answer292
viewsItem composition from the same SQL table
Well, I started studying Mysql recently and found a question that I couldn’t solve: An ITEM table has the columns (PK)cd_item, nm_item, ds_item, cd_tipo_item, the problem in this case is that an…
-
0
votes1
answer98
viewsQuery PIVOT or SUM
My consultation is as follows:: mysql> select product_id, presentation, price from Variant where product_id = "1604"; +------------+-------------------------+-------+ | product_id | presentation…
-
0
votes1
answer30
viewsDoubt Mysql bank
In this database and I’m not getting it done: I have it: value_id | entity_type_id | attribute_id | entity_id | value 600 | 2 | 22 | 40 | Gaga 601 | 2 | 20 | 40 | Tonha and I’d like to turn it into…
-
0
votes1
answer275
viewssum specific line in Mysql
Speech person! I am doing the insertion of a time (hour:minutes:seconds) in a column x, I wonder if it is possible to add the current value of the line with the next value that is inserted? like…
-
0
votes0
answers33
viewsHow to take a value within the array
I would like to know how to get the value of this array Array ( [TIMEDIFF('2017-12-14 17:44:14', '2017-12-14 16:12:21')] => 01:31:53 ) I’ve tried to $timEnd =…
-
0
votes1
answer943
viewsOptimize select PHP+Mysql loading
Hello, I have a form where I need to load two selects receiving from the bank about 13,000 records each. Initially I created a function that loaded the records and printed the HTML code of the…
-
0
votes1
answer57
viewsProblem with TIMER insertion in Mysql table using JDBC
Personal talk! I have the following problem and I am looking for the best possible solution. The following code when running a time is saved in the tAtual (current time) string and sent to the…
-
0
votes1
answer332
viewsFill Selects based on selected item from another Select
I’m having trouble filtering two selects based on a previous user selection. In the case, the user will select the client, and the selects seller and manager should only show the sellers and…
-
0
votes1
answer81
viewsPHP function only works on the first call
I am calling the same php function, in which I pass as parameter a database result, twice in the script but it only works in the first call. I realized that if I call the function that returns the…
-
0
votes1
answer181
viewsCalculate average speed of the last MYSQL table records
I’m developing a project that calculates the evolution of the water rise. Made with Arduino and Ultrasonic sensor it feeds the data into a mysql table. every 60 seconds it inserts the value of the…
-
0
votes1
answer52
viewsFailed to add the "System.Runtime" reference to Asp.net
I am trying to install the latest "stable version" of Mysql.Data from Nuget package manager. The version in question is 6.10.5. When trying to install, the message below is displayed: Failed to add…
-
0
votes1
answer1462
viewsJOIN with two queries in the same table
I need two different results coming in the same table with JOIS It works that way I have the PRODUCAO table and the BANCO table In the production table, I take the ID of the bank in the tebela bank…
-
0
votes1
answer416
viewsFill in SELECT via form (PHP)
I have the following code: <?php include("conexao.php"); $sql = mysql_query("SELECT COUNT(*) FROM escola e WHERE coordenador IN (SELECT ec.coordenador FROM escola_coordenador ec WHERE…
-
0
votes1
answer21
viewsCount how many Databases there are
In the system I am mounting, the Adm Dashboard shows the total number of orders, in which are created Databases for each user and within them, registered the requests by the Tables. Ex: User 75, has…
-
0
votes2
answers770
viewsView ID in the form before registering php and mysql
I’m making a registration screen , only I wanted the system to already display the ID (id_entity) that will be registered. When saving, it will ask if I want to register documents, then if I click…
-
0
votes0
answers285
viewsSum hours obtained through a query in mysql
SELECT TIMEDIFF( atendimento_ticket.close_atendimento, atendimento_ticket.open_atendimento ) AS duracao FROM atendimento_ticket WHERE id_tec =…
-
0
votes1
answer51
viewsthe table does not receive registration
Good afternoon friends, I’m doing trying to make a php code that involves database, and in the course of the code I came across an error that I can not solve. when trying to register a data on the…
-
0
votes0
answers673
viewsChange data type varchar to int
Is there a problem changing the data type from varchar to int in mysql? I have a spreadsheet with some items that were inserted as varchar, all are numbers. The problem is that I need to do a search…
-
0
votes0
answers150
viewsQuery Mysql works in Workbench, but not in php script
I did a search on this problem, found several with similar situation and, however, the problems were others. I have the following code where the query, if it is executed in the console, Mysql…
-
0
votes1
answer247
viewsHide two div from php form
This is the code I had: <?php $servername = "xxx.xxx.x.xx"; $username = "xxxxxx"; $password = "xxxxxxxx"; $dbname = "xxxxxxxxx"; $conn = new mysqli($servername, $username, $password, $dbname);…
-
0
votes1
answer54
viewsHow to remove an "item" from the last record?
I need the last record not to show the <div class="staffClearFix"></div> <?php $userdata = mysql_query("SELECT * FROM users WHERE rank = '9' AND status = 'Ativo' ORDER BY id");…
-
0
votes1
answer41
viewsSynchronize Mysql database with XLS
The situation is as follows. I have a MYSQL database and XLS file on an FTP server The code below downloads the XLS to read and update dos in the database from the XLS data. The problem is that it…
-
0
votes2
answers617
viewsI have the status and city ID, and now what?
Hello, in a classified site with PHP and Mysql I made through Ajax the insertion of the state and the city. When selecting the state is passed the id and it sends to the file getcity.php that makes…
-
0
votes1
answer577
viewsHow do I fill a listbox c# mysql
How do I fill a Listbox with C# and mysql and at the same time put the value of each record? until the moment I managed to configure to appear the name, but not the code of each:…
-
0
votes0
answers29
viewsHow to give a select to only get some mysql record
In the table turma_materia has the following information. CODIGO | MATERIA | TURMA --------------------------------- 1 | 1 | 2 In the table Materia has the following information CODIGO | NOME DA…
-
0
votes0
answers33
viewsLogin in Subdomain and return in the root domain
I’m stuck on this part to finish the project. The theory is as follows, you have logged in to client.site.com, and access website.com and your login data remains active, with no need to log in to…
-
0
votes1
answer34
viewsDelete table data when it reaches a certain number
Fala galera! I have a table called tb_chat with the id_message fields,name,message,date,time. how do I delete data from this table when it reaches '6' records?
-
0
votes2
answers168
viewsGrouping invoices in php mysql delay
Hello, I’m beginner, I’m learning to select, and would like to receive help from this wonderful community. I need to take only the invoices that are with the a_winning status of each student, would…
-
0
votes1
answer32
viewsI have two grouped entries but only one is changed in the update
I set up an update by grouping the field presenca which should change two arrays in a repeat loop, follows the query: UPDATE acessos AS a JOIN ( SELECT usr_id, presenca FROM acessos GROUP BY…
-
0
votes0
answers39
viewsHow do I print the semesters on canvas
I have this code, the query is already done, just call on the tag. How do I print on canvas the months of the semester after the goals. <?php /* codigo para gerar os paramentros */ $ano =…
-
0
votes1
answer135
viewsHow to interact with database data with Javascript
I was looking to build a chart with HTML Canvas using Javascript as well. The required data is in the Mysql database. However, how can I interact and access this data from the Javascript database,…
-
0
votes1
answer7376
viewsHow to check "SQLSTATE[42S22] error: Column not found: 1054 Unknown column"
I wonder how I can verify this error in my code "SQLSTATE[42S22]: Column not found: 1054 Unknown column" private $untamed; public function RetornaIndoperacionais($ano){ if($ano == '2016'){ $_base =…
-
0
votes1
answer208
viewsGrab all valuables from the database
Could someone help me figure out the mistake: <?php $mysqli = new mysqli("localhost", "user", "senha", "dbname"); if (mysqli_connect_errno()) { printf("Connect failed: %s\n",…
-
0
votes1
answer659
viewsPopular table with data according to input range values
I need to popular some li that form a table, according to the data placed by the user in the input range, for example if the user choose 200.000 would like to return me 3 tables with suggestions of…
-
0
votes1
answer469
viewsWhat’s the difference between '(quotation marks) and '(quotation marks)?
Good guys, I want to know the difference of a value wrapped with '(quotation marks) and value without '(quotation marks). Ex: SELECT * FROM dados WHERE nome = $nome (valor sem uso das aspas) SELECT…
-
0
votes0
answers23
viewsQuestions about the type of sql data
What is the best type of sql data should I use for values in case of inclusion of product notes? The notes range from: 1.0, 1.5,... to 10.0. I have been thinking about using Double, but I don’t know…
mysqlasked 6 years, 10 months ago user24136 -
0
votes0
answers259
viewsI cannot connect to Mysql database
I have a classic ASP application and I am not able to connect to the database. I have configured all the right settings stringConexate = "DRIVER={Mysql ODBC 5.3.9 ANSI Driver}; SERVER=localhost;…
-
0
votes3
answers994
viewsQuery with connection to more than one mysql php database
I have 3 databases and I’m searching for information on the three, but in my first query I’ve come across an error: It is as if the query is searching in another database that is not what I…
-
0
votes4
answers152
viewsUsing Mysql how to create a Select that searches "together" words
In Mysql how to create a select that searches "together" words. For example: SELECT pessoa FROM tabela WHERE pessoa like '%josedasilva%' But in this way nothing returns. Because it is registered as…
-
0
votes1
answer294
viewsLongtext MYSQL Persistence Variable Type
Good morning, In my database Mysql, I have a column of the type longText. My doubt is how to declare the type and annotation of this variable in the java class. Soon search found the following…
-
0
votes1
answer16
viewsReturn query generate Array
I have a query in Mysql. foreach($resultado as $row) { $lat = $row['lat']; $lon = $row['lon']; $horario = $row['horario']; } I need the result to mount an array similar to this one below. $markers =…
-
0
votes1
answer39
viewsDo not select records that have the status='Off' field
$query = "SELECT uf , count(*) as number FROM tab_clientes GROUP BY uf "; It is working perfectly but I have in the bank a status field that classifies the person as Off (need to continue registered…
-
0
votes1
answer319
viewsset LIMIT in result paging
I have a problem I have a database that I use for testing where there is 1000 record and I have a website that pulls this data to be presented. I am using paging in my query this way…
-
0
votes0
answers250
viewsauto_increment command for Id does not work after erasing data and rewriting it
When I create a table with the column "Id int not null auto_increment" and enter values in the table, after deleting the values and reinserting them, the Id does not part of 1, and sometimes with a…
-
0
votes1
answer127
viewsErrors when compiling program using Mysql resources
I’m learning to use the Mysql, but I had some problems compiling a program, in C, using the resources of Mysql. Follows errors below: gcc: error: Usage:: No such file or directory gcc: error:…
-
0
votes0
answers34
viewsHow to change form as cookies
I am working on a betting site, I would like to know how I can do for when the person bets, change the view of that bet (show how already made the bet and give the link if you want to edit).…
-
0
votes1
answer53
viewsSyntax SQL query
Can someone help produce the syntax of the SQL query to get the result below? I need all values of the "Budgets" table to be listed, but at the same time all categories should be listed as well…
-
0
votes2
answers718
viewsMysql - Create field to insert more than one value from another table
Next, it may seem like a basic question but I need to know, I’ll get right to the point: I have a register of Players and a register of games (tables), usually referenced. I need to know how to do…
-
0
votes1
answer845
viewsGraphic with Google Charts
How can I fill this chart with Mysql data? <?php $sql = 'SELECT * FROM historicos'; $resultado = mysqli_query($conn, $sql); ?> <script type="text/javascript">…
-
0
votes0
answers379
viewsConsult Mysql to bring events before, during and after the current date
I asked this question but it had not become very clear the code so I decided to post again with it complete. I seek the help of friends for a solution if possible of this code. I have a mysql…