Questions tagged as 'mysql'

2
answers

Erase everything but the smallest per day

I have a space problem and there are a lot of useless things being stored, but they are useful during the same day (you will understand). Actual problem: There are more than 2 million "lines" and this is taking up more than 1.1GB, I am u...
asked by 26.01.2016 / 15:48
1
answer

Select last JOIN record

I have a table tb_processos and another tb_detalhes (it keeps details of a certain process), I would like to get all the process data and only the last detail of the process. The way I'm doing I search for all records of tb_d...
asked by 16.03.2016 / 13:21
2
answers

Referencing the table itself in Mysql is correct?

I'm working on a system where the previous programmer has structured a certain table of posts referencing itself (to be able to identify what would be the comment of the post) More or less like this: Posts -- id -- post_id => Referencia...
asked by 08.01.2015 / 17:54
1
answer

How to update the value of a column through substitution in all rows of the table?

I have a i18n table in the database whose constant column contains all values with the prefix lang : Table description ┌──────────────┬──────────────┬──────┬────────┬─────────────────────┬────────────────┐ │ Field...
asked by 31.12.2013 / 15:11
1
answer

SELECT Mysql - Prioritizing result that is not null

Hello, I have a table with multiple records, which are not required. I need to run a query, and only bring the result that has more information that is not null. Ex: ID | Col-A | Col-B | Col-C | Col-D ----------------------------------...
asked by 21.05.2018 / 01:32
1
answer

Hibernate + Inheritance

I'm trying for some time a solution to my problem. I have researched a lot but nothing explains me clearly what I need. So I created an example application and I'm making it available from this link: Appliance To run this application, si...
asked by 05.08.2014 / 22:25
1
answer

Problem in MySQL query

I have a problem with a MySQL query. In it I have 3 tables that I need to cross: Drawing table: id concurso_id customer_id Contest table: id titulo criterioDiasCorridos criterioNotaMedia criterioMinimoVotos "notadesenho" table:...
asked by 21.08.2014 / 17:43
1
answer

Ternary relationship with a foreign key not required

I have a database with three entities that relate: user, process_selective and courses. The goal is to model the bank to meet the following requirements: User can subscribe to multiple selective processes Each selection process may or may...
asked by 09.08.2014 / 02:54
1
answer

How to fetch data from a third table based on the associative table

To contextualize: I have a table called principal and another called school. There are schools that are directors that are registered under the name of the school. In the case, these schools are registered in the school table and the associati...
asked by 01.09.2017 / 18:43
1
answer

PDO without JSON support

I need to return a row in JSON, but the PDO does not seem to give full support to operations. Always the type 245 error message.    PDO :: prepare (): Unknown type 245 sent by the server. Please send a report to the developers I tested...
asked by 18.07.2017 / 05:19