Questions tagged as 'mysql'

1
answer

filter records per month

I have the following query: $sql= mysql_query("SELECT dia, GROUP_CONCAT(hora) FROM marcacoes WHERE colaborador_id = {$colaborador_id} GROUP BY dia "); Returns the following table: But I want it to appear only from month 6 for example...
asked by 26.07.2016 / 19:44
2
answers

Database connection error

I have a problem connecting to MySQL database with PHP I am using WAMP I created a database in my PHPMyAdmin I made my connection via PHP but this error appears when I click send in my form : Thesearethecodesformyconnection:config.php&...
asked by 16.07.2015 / 18:44
1
answer

Add data to a MySQL table, with PHP. What is wrong?

Initially, I'm new to PHP and SQL, so take it easy if you have barbering in code. I'm just testing the PHP and MySQL integration, I took an example table from a book and did a quick html page to pass the parameters. HTML: (index.html)...
asked by 31.08.2015 / 04:00
2
answers

How to create a trigger in MySQL?

I have tables usuarios , usuario_voto , and classificacao_usuario . Usuarios: system user table. usuario_voto: table that stores vote from one user to another. classificacao_usuario: table that sto...
asked by 22.04.2015 / 08:34
3
answers

Capture Input ID

Does anyone know how I can capture the id of an input and send it to the database? EXAMPLE I have this input: <input type="checkbox" name="adicional" id="Leite Ninho" value="2.00"> It has the name that I will use to call it th...
asked by 30.10.2015 / 16:49
2
answers

MySQL does not use the index in the query (inner join)

I have a query that is taking a while to execute, analyzing explain I see that MySQL is not using the index in one of the tables. Tables: CREATE TABLE 'rel_financeiro' ( 'protocolo' char(13) NOT NULL, 'aceito' datetime DEFAULT NULL,...
asked by 19.11.2015 / 22:00
2
answers

MySQL Query - Count of crosstable records

I have the following tables: EachtupleofthePageViewstable(main)containsasingle-pageview.Ifasinglepersoninthesamesession(Sessions)viewsthesamepage(Pages),anewtupleisnotaddedinPageViews>.InsteadthePageViews.quantityfieldisincremented.Inonerepo...
asked by 06.12.2017 / 11:21
1
answer

Copying table in MySQL

I need to make a copy of a table in MySQL for a simulation, is there any function for this? How could I do that?     
asked by 24.06.2015 / 14:00
2
answers

Is it possible to change databases in an existing system?

I'm starting a project in ASP.NET MVC 5 with Entity Framework for a client, where it chose to use a free database, strong> MySQL . But with the growth of the application, I foresee the best use of a database like SQL Server . My suggesti...
asked by 05.09.2014 / 16:03
3
answers

Adapt query to create VIEW which returns sum of the count of two Subqueries

From according to the documentation , MySQL does not allow the use of subqueries in FROM when the query is a view :    Subqueries can not be used in the FROM clause of a view. That results in the following error:    134...
asked by 25.09.2014 / 19:25