Questions tagged as 'mysql'

2
answers

Receive POST ID and play to Location via GET

I'm looking forward to getting the ID of the entity that just registered. Only it will be played to another screen, to be registered other information. I wonder how I can get the entity ID when saving the form. This is HTML <form act...
asked by 24.12.2017 / 21:56
2
answers

How to use pseudo names with CONCAT and MySQL?

A question about MySQL asks for the output to come out in that response format. When I finish my solution through a query in MySQL , I encounter the following problem. Below is a first example solution of my query that Works...
asked by 02.12.2017 / 20:53
1
answer

Condition in MySQL - CASE X = Y THEN Where - Is it possible?

I need to get the products from my site. In it, there are two types: Physical and digital . I would like that if the products were physical, show only those that had above 0 in the stock. If it is digital, you do not need this Where in stock...
asked by 01.12.2017 / 00:27
1
answer

Recover password from email

I am having a problem: I am creating a " forgot password" field where the user types the email and if it is in the database it appears as true and redirects to page teste.php ; otherwise it displays the message " email not found ". Bu...
asked by 02.11.2017 / 01:01
1
answer

How to insert only elements that do not exist?

I have a python script that looks for elements of one database and saves it in another, so when I run the script it is duplicating the data. sql = "INSERT INTO 'alarm' ('data', 'seconds', 'culprit', 'status') VALUES (%s, %s, %s, %s) Is ther...
asked by 30.10.2017 / 15:48
1
answer

How to bring information from the database and insert into a table (bootstrap)

Good afternoon! I have tried to bring information from the database 'user' and insert it into a table that follows the bootstrap syntax. But because of the complexity of tags I end up wrapping myself around: (    The goal is: > Select a tea...
asked by 28.12.2017 / 22:17
2
answers

Get the value of a string within a PHP variable

$a = " A=1 B=2"; I need to use echo in $a and display the value of B. I do not want to use array. It's because I'm going to create a column in the database where it will house all the active options. And I do not want to have the...
asked by 30.12.2017 / 23:37
1
answer

Fatal error: Call to undefined method mysqli_result :: fetch_all ()

My code was working correctly on localhost, but when I upload to my Web page, the following error appeared: Fatal error: Call to undefined method mysqli_result :: fetch_all () in This is the source code: function find($table = null, $i...
asked by 30.09.2017 / 21:46
1
answer

Left Join with coalesce

I have the following setores(idsetor,sigla,ativo) tables and another one with the executed services called ordem_servico(id,numero,idsetor,) . I want to count how many services a sector has canceled and when it does not return 0....
asked by 01.10.2017 / 22:36
1
answer

C ++ string protection using MySQL Connector

I did a program to check my database, and I wanted to see if the strings were protected (user password and database) and in case they are not. I decompiled the program using IDA PRO and found that the strings and information is not protected....
asked by 21.01.2018 / 23:57