Questions tagged as 'mysql'

2
answers

INSERT PHP MYSQL does not insert [closed]

I have a simple problem with INSERT on PHP with MYSQL , it happens that it does not insert anything in the database, I already put it to report the errors but it does not work, I'm using vertrigo server The code is this:...
asked by 25.06.2016 / 20:34
1
answer

Connection to mysql by pdo does not exist

I can not connect to my database, I have no errors, the connection just does not happen, it just gives me a blank page. I have these 4 small files responsible for the. init.php: <?php session_start(); $GLOBALS['config'] = array( 'my...
asked by 25.04.2014 / 11:13
1
answer

How to fix insert error in table genres?

How can I fix the code below? He takes the spaces between the commas of the genres ie if I have these genres "action, adventure, romance" it puts so "action, adventure, romance" right? But if I do the reverse order (so "romance, adventure, ac...
asked by 15.11.2014 / 21:08
1
answer

Insert images into the database

Good afternoon, I inserted a large amount of information into a table in my database through a .csv file using the LOAD DATA INFILE command line, and I also have a relationship table where the product ID is recorded and the path of the photo (s)...
asked by 07.10.2014 / 19:14
1
answer

Problems filtering field with LIKE in MySQL [closed]

I have a table that has more than 1 million data that I want to filter through an acronym that can be anywhere in the field's String. The same has BTREE index in MySQL. I'm doing it this way: select instituicao, count(instituicao) from base_wo...
asked by 13.04.2014 / 02:12
1
answer

Update via value difference by id

I'm trying to perform an update through this select, where I see the different data from the pen_cadastro table, but when trying to perform an update, it presents errors: [MYSQL] UPDATE: begin transaction UPDATE pen_cadastro as CADAS...
asked by 25.07.2017 / 16:37
1
answer

MySQLi error INSERT [duplicate]

I'm not sure how to identify the error. I've always built such structures, but now that error is appearing.    Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE),   expecting '-' or identifier (T_STRING) or variable (T_VAR...
asked by 23.07.2017 / 18:05
2
answers

How to better optimize MySQL connection and listing script?

How can I better optimize the connection and listing script for MySQL ? For I check in my research several ways to do this, but I do not know if this is a correct practice of both database connection and to list information of MySQL...
asked by 03.07.2017 / 01:32
1
answer

MySql syntax error

I'm making a form to insert data into my database but the function that does this is returning me a syntax error I can not find. Function function insereProduto($conexao, $nome, $descricao, $tamanho, $quantidade) { $query = "insert into uni...
asked by 25.07.2017 / 22:23
1
answer

ERROR 1215 (HY000): Can not add foreign key constraint

I am learning a little mysql and decided to make a market system, I have the following tables: CREATE TABLE IF NOT EXISTS cliente(cliente_cpf BIGINT NOT NULL PRIMARY KEY,cliente_nome VARCHAR(100) NOT NULL,cliente_sexo BIT NOT NULL,cliente_na...
asked by 11.07.2018 / 17:47