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
votes0
answers105
viewsHow to enable events in mysql 5.7?
I’m trying to activate the events of mysql 5.7, but I get an error. To: SET GLOBAL event_scheduler = ON; I get: 01:16:06 SET GLOBAL event_scheduler = ON Error Code: 1227. Access denied; you need (at…
-
1
votes1
answer98
viewsSearch results in Mysql database with Codeigniter
I need to find a result in the database, and show it on the cart screen. I am using codeigniter, already created the model and controller and I am calling in the view, but the result does not come.…
-
1
votes1
answer43
viewsEmpty field on inputs overwriting field values in BD
I’m developing an academic system. The code below is for inserting the student’s notes, the problem is time to fill the 2nd, 3rd or 4th quarter, because every time you insert a new note, you must…
-
1
votes0
answers24
viewsHow to display multiple messages of existing data on the PHP server
Hello, In this code I would like to display two existing data message on the server being the matricula (which already works perfectly) and e-mail. I’ve tried some ways to insert these two messages,…
-
1
votes1
answer110
viewsQuery with 3 conditions AND does not work the last condition
I would like to make a query in two tables that takes into account 3 criteria, but is not presenting the expected result. Select viaturas.vtr_numero From viaturas, despacho_ocorrencias Where…
-
1
votes1
answer63
viewsPrint column created in Select in PHP
I have a table of projects and within this projects I have several students. I made a select in both tables to count how many students there are in each project, so I selected so : Select…
-
1
votes1
answer451
viewsShow last record of each person in a Mysql table
I have a table "conversations" in the database where I have transmitter receiver message id another "users" table that is not very relevant, however, I want to show in an html table the messages…
-
1
votes1
answer74
viewsQuery to not repeat an already registered value
I have the following situation: I need to make an SQL query in a field to return only the vehicles that are registered in a form (table vehicles) and that the form despachos_ocorrencias the vehicles…
-
1
votes1
answer85
viewsWhy do space aliases only work with backticks?
I have a view where all its columns have been dubbed to make it more readable: +----------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra |…
-
1
votes1
answer485
viewsDjango 2.2 error - mysql connection
Hello! Here’s the thing, I’m having a problem connecting to mysql with Django. The error is this: Django.core.exceptions.Improperlyconfigured: Error loading Mysqldb module. Did you install…
-
1
votes2
answers415
viewsNo error message appears in php, but it does not work
I made a registration form and an Insert query with Pdo, but when entering the data and pressing the button to call the query nothing happens, no error messages appear, nor in the log, there is…
-
1
votes2
answers57
viewsCount product output on day in mysql
I have an exit table of stock materials which is organized as follows I have products in stock every time I leave is released the number indicating the product id, the amount of output and the day,…
-
1
votes1
answer53
viewsUpdate one table to another with Where?
I have two tables one where the purchase order data and the second table where the items are. Table A id | ordem_compra | fornecedor | data Table B id | ordem_compra | desc | qtdade | valor | status…
-
1
votes1
answer37
viewsReplace random text between two known strings
I need to replace a random text between two fixed strings in a database created by Wordpress. Database: "database" Table: "wordpress_posts" Field: "post_content" ID: "6450" For example, I have the…
-
1
votes2
answers38
viewsQuery mysql bring last call without duplicate
Well, I have the following table: CREATE TABLE `chamado` ( `id` int(11) NOT NULL, `nomechamado` varchar(25) COLLATE utf8_unicode_ci NOT NULL, `tipochamado` varchar(25) COLLATE utf8_unicode_ci NOT…
-
1
votes1
answer33
viewssearch is not returning the php, mysql data
I am making a search page so that when I do the search is not returning the data could help me? what I’m missing? <?php require_once('Connections/conn2.php'); ?> <?php $tipo_prod =…
-
1
votes2
answers199
viewsCreation of Mysql database
I’m starting with Mysql database, and I’d like to ask you a few questions. I have been doing some research but still I could not resolve these doubts. They would be: I noticed that in the creation…
-
1
votes0
answers155
viewsSpacing increases when breaking page with Dompdf
Hello! I created a contract with Dompdf more when breaking the page is increased the space always in the first page information and so on, I have made several modifications to my code and I could…
-
1
votes2
answers97
viewsSoftware with local and remote BD recording
I have a question about the possibility of doing a type of program and what means to use. Just for the record, I’m not asking for "how to do the programming," but an opinion from more experienced…
-
1
votes2
answers43
viewsMysql Help with INNER JOIN
Talk people, good night! I’m breaking my balls here, I wonder if questions 3 and 4 are correct and how the syntax would be structured if I answer them using INNER JOIN and if it is more suitable. We…
-
1
votes1
answer206
viewsChanging Database of a system that is using EF code first
Please, I need to change the BD of an application using Mysql to use MS SQL Server. I have already migrated tables, data and relationships. The problem is that the system was made, I believe, in the…
-
1
votes0
answers28
views -
1
votes1
answer677
viewsChange color of an html table field according to php database status condition
In a table generated from database data, I need to change to certain colors of a <td></td> if the value of the field read in the database is as: 0 or 1. Example if the field read is in 0…
-
1
votes0
answers72
viewsResult + Grouping Mysql result
I have a tremendous doubt in mounting this query that I am attaching, I have a table and cross with another to know the state where had more sales, where the result is grouped and shows me the total…
-
1
votes2
answers911
viewsFields with the same name in different tables
Fields with the same name in different tables may cause conflict at the time of normalizar or make some inner join? Examples Supplier Table Field: name Field: surname Field: email Product Table…
-
1
votes0
answers32
viewsMysql has Gone away when running 'DELETE' using PHP connection
When I run the SQL statement delete from proposta_envio_fisico WHERE idProposta = 209940, my Mysql connection is disabled (mysql has Gone away) after 40 seconds. When monitoring the execution of…
-
1
votes1
answer174
viewsadd and split results in the same query by taking the result of the first sum
I need two information I make the first sum SELECT FORMAT(ROUND(SUM(CASE WHEN MONTH(periodo) IN (12) AND classificacao = '3.6' THEN IFNULL(debito-credito,NULL) ELSE 0 END)) ,2) AS custo_1, Right…
-
1
votes0
answers83
viewsError connecting running Query in Mysql + C# - Visual Studio
I’m trying to make a connection to the Mysql database through Visual Studio and I’ve already added the database in the Server manager, tested the connections and it all worked out. The problem is in…
-
1
votes3
answers61
viewsQuery SQL Doubt - Query using two tables
I’m having doubts about how to query. The problem is the following: I have two tables similar to the ones described below (I don’t have exactly how they were, but are next to the representation…
-
1
votes1
answer39
viewsWhy Between doesn’t bring the right answer
I have a specific table with the data that I do the search (sales_flat_order) where column status has among other values ('entregue', 'entregue_pd', 'entregue_pd_pago', 'avaliacao_solicitado',…
-
1
votes1
answer162
viewsUse of "Return" in module.Exports
I am developing a project in Nodejs and at the moment, I am facing some problems when returning some value of a function within a module. Code: Archive for queries async function query(query){…
-
1
votes0
answers98
viewsHow to reduce Mysql query execution time?
In a Mysql database 5.6 I have two tables, TAB_A and TAB_B, whose relation is from 1 registry in TAB_A to "n" records in TAB_B. I am making an appointment as indicated below. When the TAB_A table…
-
1
votes1
answer143
viewsHow to generate a dynamic ID for my Button with PHP and move to JS?
I’m trying to use PHP with Sweet Alert already tried with FIXED ID and it works. I’m trying to do that: while ($row = mysqli_fetch_assoc($sql)) { echo '<tr>'; echo '<td>' .…
-
1
votes0
answers33
viewsIs it possible to store the result of an ANALYZE TABLE or SHOW in Mysql in variables?
Good night, everybody, all right? I’m having a little silly doubt about the return of commands ANALYZE TABLE and SHOW in Mysql. I know that if I make a query using SELECT I can store the desired…
-
1
votes1
answer35
viewsI don’t know where I’m going wrong with store creation
Somebody help me? CREATE PROCEDURE 'sp_pessoas_insert' ( pessoa INT(11), name VARCHAR(20), lastname VARCHAR(55), age CHARACTER(2), genre boolean, countrie CHARACTER(2), state INT(11), city INT(11),…
mysqlasked 5 years, 2 months ago Rafael Rodrigues Alves teixeir 9 -
1
votes0
answers95
viewsError while creating tables in mysql
I am trying to create these tables by mysql but it is giving error. I created the relationship between the tables in Mysql Workbench. Can someone give me a hand? ERROR: Static analysis: 1 errors…
-
1
votes1
answer59
viewsDatatype Conversion Query - Varchar to Float
When performing a query, I need a column of a given table to convert your Datatype for FLOAT. COLUMN CONFIGURATION Name: 16_remuneracao_sem_13 Datatype: VARCHAR(15) PERFORMING STANDARD CONSULTATION…
-
1
votes2
answers868
viewsError: Incorrect decimal value: ' for column 'Value' at Row 1
I’m having a problem inserting a die of a maskedTextBox in the Mysql database. Follow the error Incorrect decimal value: ' for column 'Value' at Row 1 The code is this: conexao.Open(); MySqlCommand…
-
1
votes3
answers72
viewsmysql repeated names by select
I am trying to show a table where only the name of the author appears once in which his book is in stock=0, however I am getting the name of all authors in duplicate, even when the author has no…
-
1
votes0
answers798
viewsFatal error: Uncaught Error: Call to a Member Function prepare() on null
The site presents this error when connecting with BD. Someone can help me? Fatal error: Uncaught Error: Call to a Member Function prepare() on null in…
-
1
votes1
answer491
viewsMysql query using INNER JOIN with HAVING
I have two tables in Mysql. The first table curriculo has as ID cur_codigo. The second table envio possesses env_codigo as ID and env_curriculo as a foreign key to cur_codigo. The table envios…
-
1
votes1
answer160
viewsI cannot insert email to the PHP - mysql database
I’m trying to insert a simple email to the database called "newsletter_emails". Checking whether a particular user is already in the database works. The excerpt starts at "News Letter" <?php…
-
1
votes1
answer68
viewsHTML in DB with Laravel 5.8
I have several fields on a page that use ckeditor: <label for="PublicoAlvo">Público Alvo</label> <textarea name="publico_alvo" id="PublicoAlvo" rows="10" cols="80"> Coloque aqui o…
-
1
votes1
answer57
viewsDatediff calculating only time
I currently have a code that calculates the difference of 2 date/time but my calculation is only calculating the time and if the final date is another day the time does not count +24h and only makes…
-
1
votes1
answer32
viewsError #1111 - mysql
use BDCep; select MAX(count(endereco_completo)), bairro from tend_endereco inner join tend_bairro on tend_bairro.id_bairro = tend_endereco.id_bairro where tend_bairro.id_cidade = 109 GROUP by bairro…
mysqlasked 5 years, 1 month ago Douglas Nunes 43 -
1
votes1
answer58
viewsError in forming a string through a Loop (with Foreach) in an Array
Hello. I have a code that makes a Foreach in an Array that forms a String (in a variable) with all the values of this Array. The problem is that when I echo this String, at the end of the Loop, no…
-
1
votes1
answer58
viewsError while running Migration
Error: 1005 Can’t create table 'cobranca_simples. #sql-f04_1f0' (Errno: 150) (SQL: alter table carteira_cliente add Constraint carteira_cliente_carteira_id_foreign Foreign key (carteira_id)…
-
1
votes0
answers56
viewsSort mysql query correctly
I have a query to fetch some values, however the value does not return me correctly. In the example below you will notice that user 1 is below user 2. In this case the order should be in this…
-
1
votes1
answer42
viewsComposite foreign key - ERROR 1215 (HY000): Cannot add Foreign key Constraint
I during the creation of these 3 tables came across the error: "ERROR 1215 (HY000): Cannot add Foreign key Constraint" The only conclusion I could come to is that the problem lies with the field…
-
1
votes1
answer32
viewsCheck for Data Table
I’m using Data Table to make a table of domains/ subdominios and some accesses, as my table is a little large I had to use Child Rows, my concern and do the validation, I want to validate, as shown…