Questions tagged as 'mysql'

1
answer

Calculate quantity by integer

I have to insert a record in the database according to an integer. For example, 20, 21, 22, 23 ... 29 I get the first number (in case 2) and I enter 2 records. If it is 10, 11, 12, 13 ... 19 (in case 1) I enter 1 record. 0,1,2,3,4 ... 9 I enter...
asked by 15.01.2016 / 23:54
1
answer

Total query of data registered in a field

I have a table where a country field is defined. I want to know how I can develop a query that shows me how many records I have for each country. Example:    Brazil: 10 records from the USA: 5 records     
asked by 27.04.2014 / 14:42
4
answers

PHP / Codeigniter error "Array to string conversion"

I made a foreach to add values to an insert but suddenly there was a strange Array to string conversion error and I have no idea what that is. public function distribuicaoprodutos(){ $filiais=json_decode($_POST['filiais'],TRUE);...
asked by 18.02.2014 / 15:41
2
answers

How to insert the ID in the bank since it is the first field of the table?

I have auto increment ID and am having error counting columns with this code. How do I enter the ID together? #SQL Execute $uir = $pdo->prepare("INSERT INTO visitados VALUES (:IMO_CODIGO, :CATEGORIA, :BAIRRO, :FOTO_PRINCIPAL, :VLR_V...
asked by 29.09.2014 / 23:54
2
answers

INSERT INTO with filter in MySQL

I'm trying to create an INSERT INTO in an X table by making a filter in the Y table, but I get a syntax error. I researched what may be wrong, but not find out. INSERT INTO products ( SELECT * FROM products AS P WHERE P.FK_ID_QUOTE = 1...
asked by 27.11.2018 / 14:03
2
answers

INNER JOIN does not return bank result

I'm trying to use this code: SELECT * FROM tb_trabalhador INNER JOIN tb_detalhe_trabalhador ON Tb_trabalhador.id = tb_detalhe_trabalhador.tb_trabalhador_id And it returns the result in white. Is there a way to get around this with anothe...
asked by 24.02.2014 / 10:32
3
answers

Compare form domain with database domain

I need to compare domain submitted and processed by a form through $_POST with database domains because I can only insert an email from each domain in the database. For this first I got the email from $_POST and then stored all the...
asked by 17.05.2014 / 16:29
2
answers

Hibernate ORDER BY ASC | DESC does not work by passing by parameter

Well, I have a problem with sorting a query, where I am passing the field name along with ASC or DESC as the query parameter, but hibernate is not finding himself, returning the query without the ordering. Would anyone have a solution to thi...
asked by 31.03.2016 / 22:43
4
answers

E-mail falls into spam box PHP using HTML layout [duplicate]

I registered three emails in my database, however when I send the email it falls into the spam box. I do not know what to do to avoid falling as spam. In case the content of the email is an HTML email marketing. (containing photos and co...
asked by 21.05.2015 / 15:48
1
answer

PDO accentuation problem mysql php

I'm using this class to manipulate records in MySQL using PDO link But I enter ééé and enter éé into the bank the bank is uft8 the script header is in uft8.     
asked by 09.03.2015 / 21:09