Questions tagged as 'mysql'

1
answer

I need to return the null values of this inner join

I have this select of MySQL: SELECT credor.nome, banco.descricao FROM credor INNER JOIN banco ON (credor.banco = banco.codigo) It returns me all the lenders and their respective bank, but if the bank of the guy is NULL it just does not ret...
asked by 10.11.2015 / 20:00
2
answers

How to group and remove rows with null values of this query in MySQL

CREATE TABLE tblCliente ( idCliente int(11), estado int(1) ); CREATE TABLE tblPergunta ( idPergunta int, idCategoria int, pergunta varchar(255), tipoResposta tinyint(1) ); CREATE TABLE tblClienteRespostaPre ( idCliente int(11), idPergunta int(1...
asked by 29.10.2015 / 19:02
1
answer

Doubt, query does not work exactly as I want ... PHP

I have a table in the database called emails , with the following fields: id subject body e status (0, para não enviado, ou 1, para enviado). I was doing a query to retrieve only the rows that have status 1, my SQL query was: "SE...
asked by 21.07.2014 / 02:14
1
answer

SELECT command denied to user

   Error: SELECT command denied to user 'bank'@'xxx.xx.xx.xx' for table ' This error only happens in my hosting, it is running locally perfectly, I am querying 2 databases in a single query using: 'banco'.'table' ... Is it user permiss...
asked by 05.07.2014 / 03:40
2
answers

Delete record by ID

I created a button to delete a record in the bank with the following code: File form.php : <form action='deletar.php' method='post'> <input type='submit' name='deletar' value='deletar' /> File deletar.php : $del...
asked by 22.04.2014 / 01:32
3
answers

How to display part of a text stored in a TEXT column?

My table has a TEXT field where I enter text with paragraphs that are read through the nl2br function of PHP. I print each column of the table through mysql_fetch_array and everything is displayed correctly: $res2 = mys...
asked by 16.04.2014 / 17:12
2
answers

How to import data from a txt to MySQL with php?

How to import data from a txt into MySQL with PHP? I need to read a txt get all data and insert into mysql in a string of characters that in position zero has a code four-digit number and in position eleven the description with up to 80 c...
asked by 27.06.2014 / 20:19
2
answers

Assemble query for query in bank according to marked checks

I have the following situation, the user can select the language level, such as: Basic, Intermediate or Advanced and I have it in the form of a checkbox. I need to set up a dynamic query according to the user-selected options, for example, if...
asked by 29.05.2014 / 18:03
1
answer

MySQL query loading table with browse button

I'm in need of a help. I need to make a Search button, pick the parameters of some selects (combobox) and update a table below the filters. But I'm not sure how to do this, to press each click on the button. Here is the code I've alread...
asked by 17.10.2014 / 03:24
2
answers

Remove from account when value is 0

I have the following query: SELECT ROUND((( notaAmbiente + notaApresentacaoDasPizzas + notaQualidadeDosProdutos + notaVariedadeDeSabores + notaAtendimentoNaLoja + notaAtendimentoNoTel + notaAgilidadeNaEntrega +...
asked by 11.06.2014 / 20:14