Questions tagged as 'mysql'

1
answer

Sending data with php / jquery to mysql

HowcouldIsendtheindex.phpscreendatatomysql,usingjavascript/jquerytodothisfunctionthatisbeingshownintheimagebelow.Mycodeisbelow:Myindex<div class="container"> <h1 class="restaurant-title">Peixaria</h1> <div id="menu...
asked by 01.02.2017 / 19:04
2
answers

Data not saved in database in php

I have the following code of a form so that the client can give his opinion, in the navigatoror he shows success, but does not record in the database. Can someone help? <?php $Nome = $_POST ["nome"]; $Cidade = $_POST ["cidade"]; $...
asked by 23.03.2017 / 19:34
2
answers

Mysql problems with DELETE

I am failing mysql by recognizing the delete function $code = '1234'; $conn = new PDO('mysql:host=localhost;dbname=data', 'root'); $stmt = $conn->prepare('SELECT * FROM codes WHERE code='.$code.''); $stmt->execute(); $result = $st...
asked by 14.07.2017 / 21:46
4
answers

GROUP BY and ORDER BY MySQL [closed]

When I send Query: SELECT * FROM tabela WHERE id_cliente = '$id_cliente' ORDER BY ano DESC Duplicate values are returned, because there are duplicate values in the table. But I want to return only once every year contained in the t...
asked by 11.07.2017 / 20:08
3
answers

Can I use a SELECT within the IF?

It occurred to me that I tried to do this, but it seems to be wrong. Is it possible? //EVITANDO DUPLICIDADE if ($legenda > "0") { SELECT legenda FROM aula_upload_arquivo WHERE legenda = $legenda; echo 'Existe esse arquivo'; } else {...
asked by 04.12.2018 / 21:29
1
answer

Search the database when loading the page [closed]

When I load the page I want to make a query in the database and check that the result has brought more than 3 results, if I bring it I want it to block a checkbox. How can I do this? I'm using JQuery, PHP, MySQL.     
asked by 03.08.2016 / 00:19
2
answers

php file that creates html, how do I get the information contained in the database? [closed]

How do I create a html created by this php instead of containing the text between the quotes, it contains information that comes from my database. <?php # Nome do arquivo html $pagename = "pastatest/paginahtml.html"; # Texto a ser salvo no...
asked by 16.09.2016 / 22:18
1
answer

Friends, how do I view only one user with this rule

I would like to get the user id and price related to that user and only show a result for this user. Ex. I just want to see Mauro. <?php // Conectando ao banco $db_conx = mysqli_connect("localhost", "root", "minhasenha", "meubanco")...
asked by 28.06.2016 / 18:51
2
answers

Add values of the same code

Hello, I have a table that lists the purchase quantity of each product, for example, if the buyer makes 3 purchase orders he repeats the orders and quantities. An example of this is the image below: Forexample,therefrigerantthathas3requestsf...
asked by 12.11.2018 / 14:06
0
answers

Jasper Data Filter: Between two dates

I'm having a hard time generating a report in Jasper through java. In Jasper my query all correct, most when I perform through the java presents error. Report query code: select fornecedores.matricula_em, fornecedores.nome_em,fornecedores.e...
asked by 05.01.2019 / 01:01