Questions tagged as 'mysql'

1
answer

How to create a Server in PostgreSQL with port other than 5432?

Is it possible to create a server inside the Postgresql database with a port other than 5432? It is possible to have  Server1: Postgresql on port 5432 and  Server2: Test on port 5433 ??     
asked by 06.10.2017 / 18:49
1
answer

How to pass data from two unrelated tables in a view?

I'm trying to pass to a view, data coming from two unrelated tables. Only the data of one appears, the other is invisible, but you can see the change in the layout when this data is loaded. Another fact that I found curious, is that it is not gi...
asked by 16.10.2017 / 01:14
2
answers

If there is data in mysql make a PHP / MySQL update

Well, I suppose this question is recurrent. I even tried some alternatives but they did not work. I have a Screen where I record Service Orders with the Client and PC data. It turns out that. I am filling 2 Tables simultaneously. In the...
asked by 15.10.2017 / 18:22
2
answers

List all the data of a search

How to list all the data in this query, I can only display the first line but I want to query all of them and show them. public function gerarCardapio(){ try{ $cat = "M"; $sql = "SELECT * FROM alimentos WHERE id...
asked by 15.10.2017 / 00:47
1
answer

How to sort a group in the mysql query?

I'm trying to sort a query in the database by grouping the information, however this is showing the first one registered in the database, but I want the last. SELECT * FROM base_rating AS B JOIN historico_rating AS H ON B.id = H.id_base_rating...
asked by 28.08.2017 / 20:20
1
answer

Multiple upload of images with problems

My upload system did not give error until testing on a server there that it returns me a folder permission error, when will it generate the folder with the title that comes from the post method, does not generate the folder and does not do it mu...
asked by 28.08.2017 / 12:18
1
answer

Save file to MySQL database using ajax and php function

I need to save files that I can already select in a modal using a js function. Below is the modal html <div class="modal fade" id="modal_arquivo"> <div class="modal-dialog"> <div class="modal-content"> <div cla...
asked by 06.12.2017 / 11:57
1
answer

Create DB via PHP = Access Denied!

I'm trying to create a DB via PHP script, but it is returning ACCESS DENIED. <?php $dbhost = 'localhost'; $dbuser = 'usuario_root'; $dbpass = 'senha_root'; $conn = new mysqli($dbhost, $dbuser, $dbpass); if($conn->connect_...
asked by 26.09.2017 / 15:52
1
answer

Relationship of tables with the same attributes

My system is for employee control. Where we have the following types of people (or positions): agent, analyst, supervisor, coordinator and manager. How I did it: I have created a table for each type of these, plus a user table that cont...
asked by 02.09.2017 / 22:30
1
answer

Syntax error: missing semicolon [closed]

The error message Syntax error: missing semicolon is appearing in my END IF, more specifically only the IF gets underlined with red: DELIMITER $ CREATE PROCEDURE cadastraEleitor(IN nome VARCHAR(100),dataNasc DATE) BEGIN IF ( (SELECT (year(...
asked by 03.09.2017 / 19:30