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
votes1
answer133
viewsUse TIMESTAMPDIFF in table creation
I am adding mysql support to my program, currently only works with sql server, so I came across a problem with mysql. Table sql server: CREATE TABLE [dbo].[login_user]( [idx] [int] IDENTITY(1,1) NOT…
-
1
votes1
answer712
viewsHow to bring information from the database and insert it into a table (bootstrap)
Good afternoon! I have been trying to bring information from the database user and insert it into a table that follows the bootstrap syntax. But because of the complexity of tags I end up curling up…
-
1
votes1
answer1299
viewsCreate Trigger after update in the table itself and in another table
First I have a table: create table alecrim( id_alecrim int not null auto_increment, sem_epi int not null unique, p1 smallint, p2 smallint, p3 smallint, p4 smallint, p5 smallint, p6 smallint, p7…
-
1
votes1
answer350
viewsUpdate in stock table
I have three tables: 1- Regentradanutricia with the following fields: Datainput, Codfornecedor, Descricaoprod, Quantity, Price. 2- Regsaidanutricia with the following fields: Date output,…
-
1
votes1
answer28
viewsSearch in BD with For Repetition
I have the following Table as Example: data - chave primaria, contendo a data mesmo 2018-01-02. diasemana - int, contendo o dias das semana tipo 1 para segunda, 2 para terça. semanaAno - int,…
-
1
votes1
answer199
viewsCounting of items in the cart
I’m making a cart in ajax, but I’m having trouble sending the products to the bank. I could use CSS in the tag li to indicate item numbering, but does not solve the problem for sending to bank. HTML…
-
1
votes1
answer42
viewsList 4 bank tables and account
Hello I have 4 tables: Employees, Companies, Salaries and Discounts. I would like to present a kind of Holerite. My initial idea was to bring all the information together and treat the view as…
-
1
votes1
answer46
viewsProblem when trying to query with PHP and MYSQL
I’m trying to make a query directly in the PHP file where it creates the connection to the database. This query will create my table. The problem is that I am trying to reference the connection…
-
1
votes1
answer46
viewsHow to call the value of a Subquery within another Subquery and they are in the same View
I have a View with several Subqueries, one of them should be used to generate another Subquery within the View itself but I am receiving error, example: (SELECT COUNT(0) FROM `LICENCAS` WHERE…
mysqlasked 6 years, 10 months ago Leonardo Bonetti 5,313 -
1
votes1
answer3737
viewsSimple script to know how many users are online on the site?
Friends, is there a simple script in php (or some other solution for linux php/mysql server) to know how many users are online on the site? I read that websocket is good for chats. In my case, it’s…
-
1
votes2
answers3375
viewsFilter by date in Mysql
I have a table where the registration date is stored in the DATE() format. The registration comes from 2013 and takes every day and month until December 2017: 2013-01-01 2013-01-02 2013-01-03 ......…
mysqlasked 6 years, 10 months ago user24136 -
1
votes2
answers56
viewsQuery SQL Server - Union
Guys, the following query below through the Union is bringing in as follows. Consultor UsuID Tentativa 1 Abertos Gabriela Sousa 95093 17 Gabriela Sousa 95093 32 But I want to bring it this way:…
-
1
votes1
answer107
viewsSimulate Database Update with Select
How I could make a select in the table below (Mysql) to solve the method (Java)? re data is_folga 10 01/01/2017 0 10 02/01/2017 0 10 03/01/2017 0 10 04/01/2017 0 10 05/01/2017 1 10 06/01/2017 1 10…
-
1
votes2
answers824
viewsReturn predefined values depending on logical condition
I got the following script mysql: SELECT con.id_crecpa, con.id_crecpa, con.descricao, con.diabase, con.dt_emissao, con.dt_quitacao FROM crecpa con INNER JOIN pessoa pes ON con.id_pessoa =…
-
1
votes1
answer37
viewsUpdate the remainder of a table from the data contained in a row
The figure below explains well what I want to try to do (and what I tried to do but it didn’t work): That is, I need to update some rows of a table with the same data contained in a row…
-
1
votes2
answers783
viewsCreate a new database with Mysql user and password directly from PHP
Is it possible to create a new database with Mysql user and password directly from the PHP script? I ask because we are finalizing a registration system where each client will have its own database.…
-
1
votes1
answer155
viewsHow to pass javascript return to php variable
I am passing the data of some inputs to a modal, I am doing this with jquery, until ai blza, more accurate the data that were sent and use them in a mysqli query, my doubt as I pass the values sent…
-
1
votes2
answers66
viewsQuery between tables
I need to make a query as follows: select a jovem that is in the same cidade and estado that the mentor and that has the largest number of equal features that of the mentor. My consultation: SELECT…
-
1
votes0
answers637
viewsQueries with mysql LIKE Operator
Hello! I’m having a problem doing a search with like mysql. My table is type Myisam, colation latin1_swedish_ci. I’m using php and queries using like are not returning expected results! If I look…
-
1
votes1
answer51
viewsPHP page does not identify SELECT result
I’m making a PHP page to show database information, but it does not give error and only returns ":0" on the page, as if no result of the SELECT (only enters the else). Follows the code: <?php…
-
1
votes1
answer41
viewssave quiz time
I did a survey with php and javascript, it’s all right. There’s just one small detail that I’m not sure which is the best way to do it. The questionnaire has a time to be answered, and I would like…
-
1
votes2
answers52
viewsUpdate page when submitting template
I have this code and form and when pressing register to insert in the table (which you already insert correctly) I wanted you to update the page automatically to update a query that I show before to…
-
1
votes1
answer33
viewsFailed to pass entity property as parameter in Mysqlcommand
I have the following code in my application: public Usuario checkLogin(Usuario entity) { //return Usuario userEntity = new Usuario(); connection = mysql.OpenConnection(); try { MySqlCommand stm =…
-
1
votes1
answer151
viewsC++ string protection using Mysql Connector
I made a little program to check my database, and wanted to see if the strings were protected (from the password user and the database) and in the case are not. I decompiled the program using IDA…
-
1
votes1
answer395
viewsWrite textarea line break in database
I have a <textarea class="form-control" id="informacoes" name="informacoes" rows="3" placeholder="descreva aqui..."></textarea> where the user can enter various information. The…
-
1
votes2
answers953
viewsSQL - Count number of records between rows
Staff need a help in creating a query. I have a chart that ranks people per week. PessoaId | Semana | Grupo ---------------------------- 1 | 1 | 1 1 | 2 | 1 1 | 3 | 1 1 | 4 | 1 2 | 1 | 1 2 | 2 | 2 2…
-
1
votes2
answers99
viewsUpdate form not saved
I have a form already filled with two extra inputs only for the user to edit the information already registered and add the two new. However, although the alert of "successfully saved", when I…
-
1
votes1
answer64
viewsTaking HTML data for a SELECT in another file without POST
Good morning guys, I am starting my life in PHP programming and I have a little problem here. I have the following form: <form action="cadastro_pex.php" method="post"> <label>Período:…
-
1
votes1
answer616
viewsCompare fields between two tables in PHP x Mysql
Good morning, I need some help with some php tables. I have two tables from which I need to compare data, the tables are in a database in Mysql. The scenario is as follows: I have Tabela1 with…
-
1
votes1
answer68
viewsMy database does not register the data in mysql
Guys, I’m trying to insert some data in my comic book, I’ve done this action in other systems and it always worked, but this time it’s not giving, it shows no error message, it just doesn’t include…
-
1
votes1
answer50
viewsRecord edit form does not change
On one page I have a material registration form, in another I have a table that shows all the materials registered with a button to change the information about a material and this button opens a…
-
1
votes1
answer156
viewsPHP/Mysqli(phpmyadmin)
Good guys, I need help with the following: I want to insert 3 simple information in the database, product name, price and image. Outside the form I opened a tag to show the output, but it only shows…
-
1
votes2
answers60
viewsresult in 2 table columns
Good afternoon friends, I’m having trouble assembling a table with result in 2 columns with database information. <table style='width: 100%;' border='1' cellspacing='0' cellpadding='0'>…
-
1
votes1
answer136
viewsPOST is not taking input data that is in javascript
Well, when clicking on the "Program News" button appears an input to by date and time... But when sending the "form", the input that is inside the javascript is not receiving the data, the normal…
-
1
votes2
answers67
viewsRadio buttom that when selected changes the background of a div and saves the result in the BD
Hello, what I want to do specifically are radio Buttons that when one is activated the background color of the div skirt of the default color (white) and change its background color according to the…
-
1
votes3
answers281
viewsLonger date search for a specific ID
I have a problem in a SQL where I need to find the biggest date of a ID specific, where it has several records of this same ID: Dice: ID - date - name 2 - 10/10/2004 - cesar 5 - 10/10/2008 - Japan 4…
-
1
votes0
answers32
viewsThe data are not recorded in the database, but it appears that the registration was carried out successfully
<?php $host = "localhost"; $user = "root"; $pass = ""; $db = "tomorrow"; $conexao=@mysqli_connect($host, $user, $pass) or die(mysqli_error()); mysqli_select_db($conexao,$db) or…
-
1
votes2
answers73
viewsInsert data into sql after validation
I need to perform a validation where I can only enter the registration of a race in the database if the id driver and user are present in their respective seats. What is the best algorithm to deal…
mysqlasked 6 years, 9 months ago J.Rodrigues 87 -
1
votes1
answer1690
viewsMysql net Connector and Entity Framework problem
When I install the mysql connector in version 6.9.11, I can see the driver for ADO.Net, so far so good. But when I try to create the template I get the following error: Now when I install the 6.10.6…
-
1
votes1
answer60
viewsHelp with Select query in Mysql
I have the "customers" table and I have another one called "products". Each customer has several products where the products table tuples have the customer id to reference. I need a Select that…
mysqlasked 6 years, 9 months ago Leonardo Paim 1,061 -
1
votes1
answer3488
viewsHow to chart with Google Charts and PHP
I need to make a chart where it shows total entries and exits in pizza, I tried something like: <?php //Estrutura básica do gráfico $grafico = array( 'dados' => array( 'cols' => array( ),…
-
1
votes1
answer28
viewsmake an equal ID group
Well, I have a table that returns 5 users, and among these 5 may be equal teamID, example: usuario1 = teamid: 51 usuario2 = teamid: 51 usuario3 = teamid: 55 usuario4 = teamid: 55 usuario5 = teamid:…
-
1
votes1
answer209
viewsHow to resolve mysql_query error?
I installed a login and registration system in a hosting, adjusted the database and connected to the system, including created a user to test the login. However when I log in it presents these…
-
1
votes1
answer562
viewsSum Count() in mysql
I have this query that returns me the amount of equal dates: SELECT `Data`, COUNT(`Data`) AS 'Quantidade' FROM sua_tabela GROUP BY `Data`; | Data | | 2016-06-09 | | 2016-06-09 | | 2016-06-09 | |…
-
1
votes1
answer250
viewsQuery to return middle text from a field
I have an appointment that returns some class names/disciplines, but I wanted you to bring me only the names of disciplines. Below follows the query result with the default…
-
1
votes2
answers137
viewsPrioritize line in sql queries
In a Results with 2 fields exactly equal, how to do that only show rows that the priority column is marked as 1 id | origem | destino | daia_inicio | data_fim | valor | prioridade 01 | Galeão |…
-
1
votes1
answer558
viewsSpecialization multiple foreign key
Hello, I am modeling a database and I came across the following problem: I have a table called team, which is a generalization to 4 specialized tables, where each will contain a different id, to…
-
1
votes1
answer57
viewsTransaction in different banks
In a certain part of the system I need to do the transaction control, but this operation involves tables that are in different databases. I made a test by inserting two tables in different banks and…
-
1
votes2
answers798
viewsLog user date, time and IP in Login
Hello, I have a problem in which I can not solve (and I am still a layman in PHP to help), I reviewed the internet and I did not find anything that could help me, is the following, I have a login…
-
1
votes1
answer55
viewsInsert various products + a rental date for each
I am with a tremendous doubt and without any north of how to solve. I need to select products to rent to a client and inform a date of the rental time of the same, but I do not know how to present…