Questions tagged as 'mysql'

3
answers

Calculations with date in the query

I have had a hard time for some time. I have searched, but I have not found anything that would help me. I need to do a calculation on a query, it is the following. I need to get the day the record was entered in the bank and then do an opera...
asked by 10.01.2017 / 19:08
1
answer

Problems with inserting data in float field in MYSQL

I have a problem inserting a value into a field in the table, this field is as float (15,6). I circled an insert here INSERT INTO valores (valor) VALUES ('1160.480000'); Why does he enter the value as 1160.479980?     
asked by 11.01.2017 / 15:06
2
answers

Sort Mysql results using two tables

This is the following, I have two tables, one called topic and another comments (which has a foreign key of the table topics), I wanted to list the topics by ordering them by the amount of comments from each. I broke my head and could not do it,...
asked by 12.01.2017 / 14:43
1
answer

Columns with equal names in a single query, mysql

I'm running a MySQL query in this style: select contents.*, users.* FROM users, contents In both tables there are columns with the same name, and at the time of pulling them with PHP it is the first one, but I want both. Is there...
asked by 12.09.2016 / 16:00
1
answer

Converting values from a column to UPPERCASE

Using MySQL commands, could you convert all values of a column to UPPERCASE ?     
asked by 07.03.2017 / 18:28
3
answers

List columns according to the current date

I have the following view: select * from chamdosrow It returns as follows: NOME 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 --------------------------------...
asked by 03.05.2017 / 13:42
1
answer

How to return only unmatched records in a JOIN? [duplicate]

I have a question regarding the use of JOIN in SQL in this case: I have a produtos table and a destaques table that contains the id of the product. I need to make a query that returns only the records that are n...
asked by 17.10.2016 / 00:50
7
answers

PDO does not connect to MySQL

I'm trying to make a connection to the database via PDO, but every time I try to make that connection, the following message appears: could not find driver I went back to know and I knew that I had to enable the PDO in php.ini. Okay, I went...
asked by 09.02.2014 / 19:29
1
answer

Display value (decimal) without rounding

I have a database that has the following values: 48.205864 So, when I simply make a select , and bring it to the screen, it looks like this: 48,21 What do I need to do so that the value is not rounded up in C #, and disp...
asked by 28.09.2016 / 04:20
5
answers

How to redirect php pages

I have a login system in a PHP program that I want it to forwards users to different pages depending on your profile. There is a login table that has a field named " perfil " which is either 0 or 1 . The goal is to rout...
asked by 16.06.2016 / 13:35