Questions tagged as 'mysql'

1
answer

Compare two tables in mysql by grouping the main table and listing the result of the second table

Hello! I will explain from the beginning .. I am comparing the following tables accounts with clientes  select uses user_id to find all clients with same users_id2 in table clientes as described below, right th...
asked by 16.08.2018 / 09:06
1
answer

How do I search for data in MYSQL using Regular Expressions?

It is necessary to compare data from the MYSQL database, but the data to compare is not extremely similar. The MYSQL LIKE does not work in this case because there are some variables in that query. To exemplify In the user table, has the "let...
asked by 16.08.2018 / 03:37
2
answers

Only one line as true, MYSQL - Codeigniter

Hello Since I have the following table: DROP TABLE IF EXISTS 'tb_conta'; CREATE TABLE IF NOT EXISTS 'tb_conta' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'nome' VARCHAR(255) NOT NULL, 'tipo' TINYINT(1) NOT NULL DEFAULT 1,...
asked by 21.08.2018 / 21:47
1
answer

Search with multiple filters

I have this structure, how can I do it so that I can have a select that gives me higher or lower price options? this script it just lists the data by category, I do not know how to implement so that it has the possibility to sort the prices, in...
asked by 18.08.2018 / 16:45
1
answer

How to remove, insert or change a single character in a field in MySql?

I have the following table in MySql: Id | comida | preco 1 | batata | 325 2 | carne | 3.10 3 | speculoos | 3.00 I wanted to be able to change the points according to the needs below: If the food = potato , inser...
asked by 17.08.2018 / 17:56
1
answer

Separate return from a table to a timeline

I'm creating a timeline where there can be more than one user update per day. I need my return sql already compare dates and I can separate $sql = "SELECT * FROM tb_timeline JOIN responsaveis ON id_responsavel = feito_timeline WHERE para_t...
asked by 08.08.2018 / 01:26
1
answer

Select using an array?

I have the following array: var arr = ['A', 'B', 'C'...]; And in my database I have the categoria column where the values are saved in the following way: 'A,B,C...' , how could I make a SELECT by taking each category of...
asked by 07.07.2018 / 22:48
1
answer

How to encrypt StringConnection for a remote MySql database in C #

I'm developing an application that I want to sell, so I've created a serial verification system that checks if that activation code is already associated with the PC MAC. I do this by connecting to a remote database. If someone has a better and...
asked by 04.07.2018 / 10:29
1
answer

Special Character appears in Tiny - PHP

I have the following PHP page: <?php session_start(); ?> <!DOCTYPE html> <html lang="pt-br"> <head> <title>Consulta de OP's por OP</title> <meta charset="utf-8"> <meta name="viewport" co...
asked by 26.06.2018 / 15:32
1
answer

Pass variable query buider Laravel

I'm trying to do this function with Laravel Query Builder public function getEstudantesCargaHoraria(Request $request) { $ano_letivo = $request->ano_letivo; $turma_id = $request->id; $ano_letivo = 2017; $turma_id = 528...
asked by 25.06.2018 / 18:27