Questions tagged as 'mysql'

1
answer

How to return the total value of items in a table?

I want to know how to return the total value of items, I use mysqli to connect to the bank. Table ec_despesas have the following fields: (more details of the structure in this image ) id, aba, status, nome, categoria, conta, valor...
asked by 17.11.2014 / 19:53
1
answer

Single user name and password converting mysql_ * to PDO

I need to update a legacy code and for that I need to make two modifications to it. The first modification is to abandon the mysql_* functions and use the PDO. The second is to update the database so that I can not register two user...
asked by 26.12.2014 / 09:45
1
answer

I can not get the date in the table [closed]

I'm doing the following command: SELECT h.h_dia FROM hh h WHERE h.h_dia = 20180621 GROUP BY h.h_dia     
asked by 13.07.2018 / 15:43
2
answers

check difference between values with php [closed]

I needed help to verify that the quantity chosen by the customer is different from the existing stock Code that I'm using $con=mysqli_connect('localhost', 'root', '', 'pap') or die (mysqli_error ()); $strSQL1 = "SELECT 'QuantidadeProduto'...
asked by 07.06.2018 / 13:30
1
answer

Parse error: syntax error, unexpected '$ error' (T_VARIABLE) in C: \ xampp \ htdocs \ HITSS \ cadastrar.php on line 26 [closed]

I'm having the title error in my code, can anyone give me a light? <?php $erro = array('1'); include("conexao.php"); if(isset($_POST['Entrar'])) { //1 - REGISTRO DOS DADOS if(!isset($_SESSION)) session_s...
asked by 09.07.2018 / 15:53
2
answers

Create form in PHP using result retrieved from a SQL query

I need to send what was typed in the input field and send via the POST method. My code looks like this: <?php include_once("../controle/conexao.php"); //Recuperar o valor da palavra $usuarios = $_POST['palavra']; echo '$usuarios'; //Pesqui...
asked by 17.08.2016 / 22:58
2
answers

PHP insert an array of data into a mysql table [duplicate]

I have an array in php that contains some data, eg: Array ( [nome] => Nome [sobrenome] => Sobrenome [genero] => 1 [email] => [email protected] ) And I would like to insert this data into a mySql table more automat...
asked by 03.09.2016 / 00:23
1
answer

Query MYSQL too slow, more than 25 seconds, how to improve?

I have a query in mysql that is very slow, more than 25 seconds. The base is quite large, something around 1,000 records of real estate (table osrs_properties) and 16,000 records of photos (table osrs_photos). The query without the photo t...
asked by 10.12.2018 / 13:18
2
answers

Creating MySQL user with security

For security reasons, what privileges should a database user have or should not have?     
asked by 07.04.2018 / 00:42
1
answer

mysql query problematic [closed]

I have the following data admlogin: admin1 admsenha: admin admlogin: admin2 admsenha: admin admlogin: admin3 admsenha: admin <form action="#" method="post" id="frm_login_p" name="frm_login_p"> <input class="form-control" type...
asked by 09.11.2018 / 21:49