Questions tagged as 'mysql'

3
answers

Problems uploading images in PHP

I never moved with uploading files and today I really need to do so. I have a code to test, and then use it on the site. Here I have HTML : <html> <body> <form action="inserir.php" method="POST" enctype="multipart/fo...
asked by 10.07.2015 / 13:11
2
answers

Commit using PHP

Setting SET AUTOCOMMIT = 0 on the connection, but not working. I'm using $ mysqli-> real_connect () if (!$conn->options(MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT=0')) { $fErro .= '<p>Não foi possível desativar o autocommit</p...
asked by 02.07.2015 / 15:45
3
answers

Relationship of tables

Good Night, I have a database with several tables and I need to do a query relationship 4 tables CREATE TABLE IF NOT EXISTS 'cad_cliente' ( 'id_cliente' smallint(5) unsigned NOT NULL, 'nome_cliente' varchar(45) NOT NULL, 'nom...
asked by 06.07.2015 / 23:00
1
answer

What kind of conversion does the precompiler of a DBMS with the SQL language?

The precompiler of a DBMS treats commands written in SQL. Assuming I'm using MySQL. What would be done with the command:    select * from client; What kind of conversion does the precompiler of a DBMS with the SQL language?     
asked by 02.11.2015 / 02:02
1
answer

Problems inserting a datatime record

This is the description of my table in MySQL That'showI'mcrackingthelogsinsertintopedido(data_criacao,data_entrega,entrega_cep,entrega_cidade,entrega_logradouro,entrega_numero,entrega_uf,forma_pagamento,status,valor_desconto,valor_frete,valor...
asked by 31.05.2015 / 17:38
2
answers

Problem with INSERT using PDO

I have this code below that is working perfectly, but I would like to change it to work in PDO but I am having trouble registering with DB when I change it to the PDO. It refers to errors online143 and line 164 ThecodeinMysqlthatiswo...
asked by 28.05.2015 / 21:50
1
answer

CURRENT_TIMESTAMP () inserting zero

I am inserting more than 9000 records via query, but the CURRENT_TIMESTAMP () -3 is entering multiple fields with 0000-00-00 00:00:00. Is there any way to prevent this? INSERT INTO yourls.yourls_url (keyword, url, title, timestamp, ip, clicks)...
asked by 02.06.2015 / 02:30
2
answers

Mysql returns only the first record

I created this function, but, it returns only the first record of the table. function pega_conteudo_pela_id($id_assunto){ global $conexao; $query3 = "SELECT * FROM '{$id_assunto}'"; $result3 = mysqli_query($conexao,$query3) or d...
asked by 20.05.2015 / 06:07
2
answers

fetch_array does not return data

I am making a list of users and the data does not appear on the page. I waited for the user's name, his type, and the number of posts and replies he sent to the system to appear. There is another problem. Three users are registered, but only one...
asked by 25.05.2015 / 19:29
3
answers

Select union between tables

I have two tables, CLIENTS and SALES. I would like to know which clients have no sales, and I store the customer ID in the sales table. I tried this but to no avail: SELECT * FROM cliente RIGHT JOIN vendas ON (vendas.id_cliente = cliente.id...
asked by 23.04.2015 / 20:42