Questions tagged as 'mysql'

1
answer

Automatic Database Synchronization in MySQL

Hello, I have a local MySQL database where the availability is 24h, however I have another database in another place that is available for a few hours, anyway ... I want to synchronize two identical databases automatically when both are availabl...
asked by 21.03.2016 / 14:24
1
answer

I can not save to the database, nor does it show error logs in the hibernate project

In the project I use hibernate , and when I try to save a new client, it only shows the validation message of the CadastroClienteService class. The strange thing is that all fields are filled in form, it seems null pointer , b...
asked by 20.03.2016 / 19:27
2
answers

Mysql - Recursive Query to get only parent categories

I have the following table category : id | desc_cat | parent_id 19 | Pessoais | (null) 20 | Cartao Credito | 19 21 | Academia | 19 22 | Residencia | (null) 23 | Agua | 22 24 | Luz | 22 25 | Alug...
asked by 01.05.2016 / 21:56
1
answer

Laravel - List with relation of tables (state / city = person)

I have the following tables: contacts = > id - name - state - city states = > id - status - acronym cities = > id - city - state_id And the following templates: State.php <?php namespace App; use Illuminate...
asked by 03.05.2016 / 01:13
1
answer

Upload and save image PHP / MYSQL

This is a form that contains fields like CPF, RG ... and a photo for profile. I can add normally, but I can not edit. If I change any data other than the photo, eg CPF, it works perfectly. But if I want to change only the photo, the upload...
asked by 29.04.2016 / 20:16
1
answer

Update with select concatenated between two columns of the same mysql table

I am trying to execute a query in which I will concatenate two columns of mysql name and surname , and perform the update of this concatenation in the variable full name in all records of the table. Follow the code: UPDATE eskalera.curri...
asked by 30.04.2016 / 02:45
1
answer

How to add column in MySQL using SUM leaving column available for display

I need to add a few columns in MySQL, use the sum to make a mean and leave the columns available for display in a report, I tried to add the query in MySQL but it did not work, I'll try to explain better with an image of my bank, I tried to sum...
asked by 03.03.2016 / 20:55
2
answers

PDO Array mySQL with Json display error

I'm having a hard time json_encode echo json_encode($autocomplete -> fetchAll(PDO :: FETCH_ASSOC)); I'm doing a select from the database so fine, but when it transfers the data to this echo from above, many characters appear that javascr...
asked by 03.03.2016 / 17:41
1
answer

Delete record when the date of a column is reached

I have the tables: In%with%Ihavecolumnanunciosthatreceivesthenumberofdaysthatthatadisvalid,Iwanteverydaythatpassesthedatabasetoautomaticallydecreaseexpiracaointhatcolumn,inacountdowntodeactivatetheannouncement.Andwhenitreaches0,itcreatesarec...
asked by 12.05.2016 / 19:06
1
answer

Laravel - Search if there is a relationship in the many-to-many table

I need to search for users based on some filter attributes. I have the contacts table: id | nome | email 1 | asd | [email protected] 2 |teste | [email protected] The groups table: id | grupo 1 | grupo1 2 | grupo2 And the table c...
asked by 10.05.2016 / 22:24