Questions tagged as 'mysql'

1
answer

variables in mysql: declare, set, how to get an element from a table

Speaking of variables that can be declared within begin , I have seen that it has Declare and set only I do not know when to use them. I saw that it has set @x , set x , set x = x+1 , set x := x+1 ; they all confuse...
asked by 08.10.2015 / 18:52
1
answer

What is the maximum limit of PHP / MySQL / Nginx in a request before giving error 504 Gateway Time-out

And if possible how can I extend this time for large queries / requests?     
asked by 13.05.2015 / 17:38
2
answers

Error # 1062 - Duplicate entry '1' for key 'PRIMARY'

I was trying to put one of my tables as primary key . As soon as I try, the message appears:    # 1062 - Duplicate entry for key 'PRIMARY' The data is populated and looks something like this: I tried to put Sub_Id as t...
asked by 27.04.2015 / 16:01
1
answer

Cardinality Class Diagram

When I make a Class Diagram or MER, the cardinality must be defined. As an example: A doctor consults from 0 to n patients; a patient is consulted by 0 or 1 physician. Why 0?     
asked by 24.09.2015 / 23:05
1
answer

JPA subselect in MANYTOMANY

I'm developing a system with java + jpa + mysql but now I have a question that I still can not find the answer ... Given the tables and entities below, I would like to set up a jpql to perform the following query in native SQL: SELECT * FROM p...
asked by 24.09.2015 / 20:20
1
answer

How to capture a MySQL query from a given table in real time?

I want to capture queries that are sent to MySQL from a particular application, is it possible?     
asked by 22.10.2014 / 19:03
2
answers

Which is the best and safest method to program RFQs?

Well, folks, I'm now switching to PDO in php, I wanted your opinion to know if the method I'm programming is safe and if I'm programming PDO in the right way because I saw on the internet several ways to program Example code of how I am doin...
asked by 06.03.2015 / 20:53
1
answer

Add Field Time MySql

Dear, I have a table with a TIME-type column, which stores the time worked on the day, and I'm trying to add these times to the end of a month, but with no success. I used the following query: Query 1: SELECT TIME_FORMAT((SELECT sum(TOTA...
asked by 03.03.2015 / 11:17
1
answer

How to list a sample of all tables in a MySQL database?

I need to sample all the tables in a MySQL database, for example through SELECT * ... LIMIT 10 . I already have the code that returns all the tables in the current database: select table_name from information_schema.tables where table...
asked by 26.09.2014 / 19:08
1
answer

Know the name of the object in JSON

I have a JSON and I need to know the name of my object and the values it has, for example: {"Pessoas" : [ {"Nome": "Welson Play", "Idade":19}, {"Nome": "Stephanie", "Idade":15}, {"Nome": "João P...
asked by 08.07.2015 / 13:11