Questions tagged as 'mysql'

1
answer

Return JSON infos in MYSQL in SELECT itself

I have a table in the DB called "menu", with a column called STRUCTURE. It was of type text, and it contains a JSON with a menu structure referenced by IDs of another table "category".    Ex: ["id": 1}, {"id": 3}, {"id": 4}, {"id": 131} :   5...
asked by 26.12.2018 / 23:49
0
answers

Call Query in php hangs other queries

Because when doing a first query to a call and then trying to make another one the php hangs? For example, running this simple stored procedure in php DELIMITER $$ CREATE DEFINER='root'@'localhost' PROCEDURE 'curtidas_sp' ( IN '@post' INT...
asked by 28.10.2018 / 02:20
0
answers

PDO - Join in a function

I am inserting a new query into a functional system, but I am not able to understand how to insert a JOIN , I saw the function exists, I just can not deploy it. I tried to run like this $query_cliente = QB::table('tbl_reclamacoes')->jo...
asked by 27.12.2018 / 13:09
0
answers

List data for the Option

I'm trying to list database data for my options, but I do not know how to do this I've tried the following way down there, I want it when the form is submitted I want to send ID to that location, but not select I want to show descrição...
asked by 19.10.2018 / 22:45
1
answer

Error handling exceptions - "Object reference not set to an instance of an object"

public String IdentificarAcessoDAL(FuncionarioDTO acesso) { try { conexao.cmd.Connection = conexao.conexao; string recuperar = "SELECT CARGO.NOME_CARGO FROM LOGIN INNER JOIN FUNCIONARIO ON FUNCIONARIO.C...
asked by 21.10.2018 / 07:51
0
answers

Refresh field after insert

I'm trying to create a trigger to update a value after insertion, or before it works. I have the following table: test Remembering that the date field type is timestamp and the default value is CURRENT_TIMESTAMP id | da...
asked by 22.10.2018 / 20:57
1
answer

How do I set only one column row in which all values in this column are the same?

I'm trying to set the column ocupado only one line at a time, something like: update suite set ocupado = 'S' where tipo = 'i'; But this statement changes all rows in column ocupado where tipo is i , and that's not...
asked by 24.10.2018 / 17:36
1
answer

Import CSV file to MySQL

I have a database with these two tables: TABELA CONTRATO id contrato pessoa_id TABELA TITULO id titulo valor vencimento contrato_id I need to import the contrato column, retrieve the ID of the inserted contract, and then impo...
asked by 25.10.2018 / 15:54
2
answers

Save the Name of a Column as an item in another Column

Next, I have a table with several values and I need to compare the values of several columns, I did this with PHP and I managed to separate the highest value, follow the code: while($aux = mysqli_fetch_array($query)) { $cb = $aux['cb...
asked by 01.11.2018 / 15:46
0
answers

Is it possible to get real-time data in a database of my mysql database and asterisk [closed]

I would like to know how I can get the asterisk database information in real time, in my bank only after user disconnects the phone there information and recorded in the bank, but want to know if it is possible to get real-time information     
asked by 17.10.2018 / 14:39