Questions tagged as 'mysql'

0
answers

How to perform nested column query of type JSON

I have the (nested) data below in a column of type JSON: [{"modSelecionado": "13"}, {"modSelecionado": "15"}, {"modSelecionado": "16"}, {"supMaxima": "5,00", "tensaoMotor": "1", "comunicacaoMotor": "1"}] How do I make a query, to know for...
asked by 23.10.2017 / 16:49
2
answers

MYSQL Connection Error

I'm setting up a machine to set up PHP and before using EASYPHP to run locahost my MYSQL ran all the normal banks, now when I try to run the error. Errors: 1. 2. ThingsThatCanHelp1. 2.     
asked by 22.10.2017 / 07:16
0
answers

Look for bmp image in the bank and show in the view.

I have a bmp image saved in the database, but this file is already in the database and was not included in the framework, I would just like to know how I can display this image in the view. Note: I've already tried the method: No Controlle...
asked by 21.10.2017 / 22:55
1
answer

MySQL IN function but my parameter comes a string

Hello, I have a procedure that receives some parameters, among them I need to receive a list of codes, which are 10 at most. But in the query, I'm trying to WHERE value IN (value1, value2), but since it is a string this does not work. I...
asked by 25.10.2017 / 21:13
1
answer

Ignore certain value with AVG

I would like the calculation AVG to ignore the values above 100000 (10 seconds), with the following query: user_id, COUNT(*) as total, AVG('exec_time') as tempoMedio, SUM(CASE WHEN 'success' = 1 THEN 1 ELSE 0 END) inTime, SUM(CAS...
asked by 25.10.2017 / 19:31
1
answer

Fill input2 from input1?

I have "input1" that looks for the name of a client and saves its id in the table, this search is done by autocomplete with JavaScript. Now you need to have the "partner" id linked to the client id that has been inserted in "input1", both bel...
asked by 01.11.2017 / 14:07
1
answer

Create foreign key in PHPMYADMIN online

I created my project tables using the mysql workbench , but when I put online the phpmyadmin does not register the foreign keys. How can I solve this problem? It gives the following error when creating a table:    1005 - Can not creat...
asked by 08.11.2017 / 12:32
1
answer

mysqldump: Got error: 1054

I'm trying to do a Dump to do a Database Join. The following command: mysqldump -u root -p senha -hlocalhost --opt -t --where codemp=1 database > emp01.sql The same is returning the error    mysqldump: Got error: 1054: Unknown column...
asked by 17.10.2017 / 19:28
0
answers

How to format date and time from Mysql to the Brazilian format in PHP? [duplicate]

My two doubts are as follows: 1) When I retrieve the date and time ( datetime ) from the database comes in this format (example):    2016-11-12 11:19:34 But I want to show it as follows:    11:19:34 12/11/2016 How to do...
asked by 18.10.2017 / 14:36
2
answers

When submitting form, GET data is lost

I'm trying to send data from a form to the database. I have data coming from POST and also from GET, but clicking on the submit button the value of the variable that receives GET data is zeroed. THIS IS THE FORM. <form action="pedidos.ph...
asked by 18.10.2017 / 04:53