Questions tagged as 'mysql'

1
answer

Get data from fields of the same name but from different tables

I have a select that it fetches data from three different tables, but has some fields in common between these three tables. My question is how to get the data from this field, which has the name in common with the other tables. My select look...
asked by 10.12.2014 / 14:32
2
answers

Refresh the content of a page without reloading it

I'm working on a college project where I'd like to refresh the content of a page without reloading it. The page in question has its content received from a PHP script, which in turn takes the content to a MySQL database. This is...
asked by 18.09.2014 / 14:16
1
answer

Query Mysqli SUM does not return with result

I'm trying to sum a column using the SUM method of mysqli. The problem is that my query does not return with results. My code is this: $sql = 'SELECT SUM(size) as soma, porta FROM '' .$this->options['db_table'].'' WHERE 'porta'=?...
asked by 09.09.2014 / 05:28
2
answers

mysql errors being presented in French

All errors I receive regarding phpmyadmin database are in French. However, the panel is in pt-br, only query errors - a select for example - are displayed in French. I use WAMP. EX: Aucune base n'a �t� s�lectionn�e     
asked by 06.01.2016 / 20:05
2
answers

What should Query be for a result of tuples in which the value of a column is 'x'?

I have the following query: $select = "SELECT concat(mid(cpf,1,3),'.',mid(cpf,4,3),'.',mid(cpf,7,3),'-',mid(cpf,10,2)) as cpf, nome, genero, nome_cracha, rg, crm, crm_uf, rua, bairro, cep, cidade, estado, telefone, celular, fax, email, cna...
asked by 31.01.2014 / 16:46
3
answers

How to find relationship and cardinality in MySQL?

The image below shows a relationship between two tables created from the MySQL Workbench. What I need to know is how I can find this information inside the database. I need to know exactly what type of cardinality (1: 1 or 1: n). I've a...
asked by 29.09.2015 / 00:21
3
answers

Select data and display

I'm having trouble querying MySQL in a simple way. I already have a file in the includes of connection to the bank that works normally. But in the query page I can not display them. The code I found on Google . 1 - I do not unde...
asked by 23.02.2015 / 15:53
1
answer

Insert date and time into mysql automatically?

I am creating a system and I would like to know how to fill in the form below and how do I insert the time and date in mysql as it is in the operating system.     
asked by 17.01.2017 / 00:13
1
answer

Perform direct calculations in sql query

How could I perform a series of calculations directly in the sql query, how does SUM() that sum does it have some way of adding one column to another and decreasing another? $sql02 = mysql_query("SELECT * , SUM(valor) as tt FROM finan...
asked by 30.01.2017 / 23:57
3
answers

Space occupied between different types of integers

From the official MySQL documentation table, and a question here on SOpt , I had a question. Considering the table: Let'ssayI'mgoingtouseaTINYINTandaBIGINTtostorethesamevalue(eg240).Iask:Itdoesnot"reserve" all bytes for that record (wo...
asked by 28.06.2018 / 18:07