Questions tagged as 'mysql'

2
answers

Tool to debug a stored procedure in linux

I would like to know if anyone knows or even ever used any tool to perform a debug in stored procedures in linux . > I am currently using the MySQL Workbench and the DBvisualizer , but as far as I know none of them provide procedure...
asked by 27.02.2015 / 20:42
1
answer

How do I search for records that fit into any category in a list, even if the category name only partially matches? [duplicate]

I have this statement: $nova = (explode('/', implode('/', $_GET['tipo']))); What results in this array: Array ( [0] => CONJUNTO [1] => SALA [2] => LOJA ) When I do this query in my database ... $sql = "SELECT...
asked by 04.10.2014 / 14:49
1
answer

How to check if a name is in the database?

I want to check if a name exists in the database; if there is no registration. Using the code below I can register multiple users with the same name. cadastro.php $user = $_POST['user']; $pass = md5($_POST['pass']); if(empty($us...
asked by 21.12.2014 / 16:56
1
answer

How to remove the red part of the figure?

require("setup_do_banco.php"); $colunas = $pdo->prepare("SELECT * FROM origem WHERE ativado = 1"); $colunas->execute(); while ( $coluna = $colunas->fetchAll(PDO::FETCH_ASSOC) ) { $array_banco = $coluna; } foreach($array_banco as $...
asked by 28.12.2014 / 17:02
2
answers

How to calculate average hours?

I have a table named visitantes in it I enter the hora_que_entrou and hora_que_saiu of my user on my site. These are in DATETIME format. I would like to run the average that they spent online, is it possible wit...
asked by 26.12.2014 / 20:27
1
answer

Mysql - Count different values from the same field

I have the following table: Tabela partidas +----+----------+------+---------------------+ | id | name | win | date | +----+----------+------+---------------------+ | 1 | Fulano | Y | 2014-01-01 00:00:00 | | 2 | Ful...
asked by 09.08.2014 / 13:29
2
answers

Insert mysql using ajax

I'm trying to insert a record into the DB via ajax but I'm having problems, I was using format: 'json' but it was giving permission error and talz, now I'm using type: "POST", dataType: "jsonp" . Anyway, this data for me to insert t...
asked by 12.08.2014 / 19:28
1
answer

Problem with condition in SQL query

I have a query that looks for information from two different tables, with two conditions. Apparently it worked fine, but when the a.vendedor field is empty, the result is null. I understand that the result should be the same, but I wou...
asked by 29.01.2015 / 10:57
1
answer

How to stop stored procedures in MySQL?

Is it possible to stop a stored procedures in MySQL ? I put a procedures to feed a database table for load tests with 10 million records, however the insertion is very slow and I wanted to stop it without having to stop the...
asked by 26.02.2016 / 14:47
1
answer

LIKE query in related table

I have a query that does the search for TECHNICAL CALLS and in this research I make some JOINS to bring related information. I need LIKE to also work for the CLIENT name (which is in another table) The query I have is this: SELECT *,...
asked by 27.03.2014 / 20:43