Questions tagged as 'mysql'

2
answers

How to select data for the month and previous year?

I'm trying to do a search from dates in MySql. I need to get the total sum of a value where the year and month are smaller than the ones reported in the variable: SELECT SUM(valor_pag) FROM controle WHERE MONTH(data_paga) < 07 and YEAR(d...
asked by 15.07.2017 / 23:27
1
answer

How to sort a MySQL query with a date in date format to take only the month

I have a date field, I'd like to make a query to get only the month of that field. How can I do this?     
asked by 17.07.2017 / 16:08
1
answer

Storage Capacity MySql

I have a MySql table that I back up daily, I have 552 records on it today, but the last two times I backed up I realized that they were only saving 487 records. How do I increase the storage capacity of a MySql table? To do the backup I right cl...
asked by 18.07.2017 / 15:51
1
answer

Tags in a table for each?

I have the table "noticia" and I'm going to make a system of tags, these tags will have to have a table for each or just a table?     
asked by 30.07.2017 / 18:13
2
answers

Comparison of two dates using varchar type MySQL

I have a question regarding the preparation of a SQL query in which I pass a registration date and check if it is larger than the current date, but I have a problem the date of registration is varchar and it follows the format "dd / mm / yyyy ",...
asked by 05.07.2017 / 20:26
1
answer

Revision in query

I have this query in order to list users with more comments, however, it can not display users with the banned column = true. SELECT * FROM usuarios a INNER JOIN topicos_comentarios b ON a.usuario = b.autor WHERE a.banido <> true GROU...
asked by 05.07.2017 / 23:01
1
answer

How to update a different table with a data from another table in PDO

Personal I have a payroll table, and I have an indemnification code for each transaction, when receiving the data of the update, I want to get the data and insert in update in another table of the bank being that 1 of the fields does not have in...
asked by 26.06.2017 / 20:46
3
answers

Inserting numeric data into the database

I am having trouble inserting into the database the field is formatted as DECIMAL(10,2) ), when I try to enter the direct monetary value through MySQL it works with the end point instead of the comma ex: 135.45 - The bank addresses the...
asked by 11.09.2017 / 16:58
2
answers

How to send data from an HTML page to MySQL?

I made a registration form, but when sending the values to the database, it does not fill the table and returns no errors. Code I used was as follows: <body> <?php $conexao = mysqli_connect("localhost", "root", "","vill...
asked by 12.09.2017 / 04:40
4
answers

How to pass a text from the database to display as a link on a site

Hello, I'm making a website in php and html, linked to a database in mysql. And I have a news table in the database, with the idartigos, title, text and link fields. The link is passing in text and I would like it when someone sees the new...
asked by 27.06.2017 / 21:57