Questions tagged as 'mysql'

1
answer

Problems fetching the id of the previous insert

Code to insert: $codigoutente = $_POST['codigoutente']; $codvalencia = $_POST['codvalencia']; $Responsavel = $_POST['Responsavel']; $Contato = $_POST['Contato']; for ($i=0;$i<count($_POST["Responsavel"]);$i++) { $Responsavel = $_POST['...
asked by 20.12.2018 / 18:53
3
answers

Show the user the position of the test

I have a table where I store test scores. Ex.: Name, Note1, Note2, Note3, Course The result is this: Nome | Nota1 | Nota2 | Nota3 | Curso Pedro | 7.6 | 5.5 | 3.2 | Desenho João | 8.0 | 3.1 | 6.6 | Desenho Ana | 9.0 |...
asked by 21.12.2018 / 14:59
1
answer

Incorrect Redirection

I'm trying to redirect registered users to the control panel and other visitors to the login page, but I get this message: Login<?php$page="Login"; include "header.php"; $user_error=''; $pass_error=''; if(isset($_POST["login"])){ $usern...
asked by 24.05.2014 / 00:56
3
answers

Return a "SELECT * FROM" in the JavaWeb browser

Hello everyone, I'm studying JavaWeb and I came across a boring bug !! I already researched a lot on the subject but I could not solve this error. I have this method that is pulling all data from the "contacts" table of the database and retur...
asked by 07.12.2018 / 03:35
1
answer

Symfony 4 - How to save images with FormBuilder (FileType) in Base64 in the Database (MySQL)?

Hello, I'm trying to make a form where the user just inserts an image. In theory, the image should be stored as a Blob (Base64) file in the Database, however, Symfony is storing "tmp / php / random value" in the "photo" field of the credential...
asked by 06.12.2018 / 18:46
1
answer

Save return of fields in variables in python

I made a query in mysql with python and show the result: cursor = db.cursor() cursor.execute("SELECT Dias, HoraConsulta, HoraSaida, nome, Consulta, centrodb.LocalConsulta.Descricao, Contato FROM centrodb.RegistoConsultas LEFT OUTER JOIN ce...
asked by 06.12.2018 / 17:55
1
answer

Integrity constraint violation in "Many to Many" create - Laravel

Context: By registering a company, by being "attached" several clients to it and that same customer can be "attached" in other companies. I have the following database structure: Model "Client": public function enterprises() { return...
asked by 12.12.2018 / 14:54
1
answer

Group By show when not in table

I have the following table in MySQL: I wanted to search for users who have the color BLUE but do not have the GREEN color, ie, this table would list me the user 3 only, I tried this way: SELECT * FROM usuario_cor WHERE tipo = 'azul' A...
asked by 03.12.2018 / 17:23
1
answer

InnerJoin with 3 tables Mysql [closed]

I am trying to make a query that when I type the name of a product, I return the sector code and the image associated with that sector but my innerjoin is not working I'm trying to do this: select ID_CORREDOR_PC, IMAGEM_PC, produto.NOME_PRO...
asked by 04.12.2018 / 22:42
1
answer

Filter in update of a table based on information from another table

Hello, I need to make a UPDATE in a table (in the example table 'reservations'), based on information from another table (in the example the table 'administration'). Good until then I could do with the help of a person here of the forum .....
asked by 03.12.2018 / 21:54