Questions tagged as 'mysql'

1
answer

Error Returning Query Using Like

I'm trying to do a jpql query with like using JPA. However, it is not working. UserRepository class public class UsuarioRepository extends RepositorioGenerico<Integer, Usuario> { public UsuarioRepository() { super(Usuar...
asked by 14.11.2017 / 19:35
2
answers

Error in trigger - MySql

I created the following trigger, but it has a syntax error that I can not find. The error is as follows    ERROR 1064 (42000): You have an error in your SQL syntax; check the   manual that corresponds to your MariaDB server version for the...
asked by 13.11.2017 / 20:18
1
answer

Join table columns where id equals variable

I have 4 tables they already have foreign key. aluno: id matricula username curso_id // referencia a id_cursos da tabela cursos, coluna id_cursos. cursos: id_cursos nome_cursos modulos: id_modulos nome_modulos cursos_id...
asked by 04.11.2017 / 17:15
1
answer

How to join with multiple tables?

I have 4 tables they already have foreign key. aluno: id matricula username curso_id // referencia a id_cursos da tabela cursos, coluna id_cursos. cursos: id_cursos nome_cursos modulos: id_modulos nome_modulos cursos_id...
asked by 04.11.2017 / 18:49
1
answer

How to get the largest sum in a table?

I have a table id produto vendas data 1 laranja 4 16-10-2016 2 cenoura 3 16-10-2016 3 cenoura 6 17-10-2016 4 laranja 5 17-10-2016 5 laranja 1 18-10-2016 6 laranja 1 19-10-2016...
asked by 16.10.2017 / 22:15
3
answers

find reference in another table

I have the following tables: register batches Where cadastro contains the primary key id_cadastro that the lotes refers to it. However, the bank was not normalized, so the foreign key that refers to id_cadastr...
asked by 16.10.2017 / 19:33
1
answer

How to solve this error 'Undefined variable' when accessing a view in laravel 5.1?

My problem is this: I uploaded the data to the view banner, which is included in the view main, which in turn is expanded in the home view, is working well. But when I try to access another view (view create-lemma) in which the view main is a...
asked by 10.10.2017 / 02:30
1
answer

Doubt mysql query + php

I generate a date in PHP and save it in the database: $today = date('Y-m-d H:i:s'); $timestamp = strtotime($today); In the bank it is saved in this format: 1474496101 When I do a SELECT in this field using the query below for exam...
asked by 06.10.2017 / 22:46
1
answer

Error inserting data into table!

In the student master system this logic scheme is available: HowcanIenterthecorrectstudentdata? SQL--GeraçãodeModelofísico--SqlANSI2003-brModelo.CREATETABLEAluno(idalunovarchar(50)PRIMARYKEYauto_increment,nomeAlunovarchar(50),matriculavarcha...
asked by 07.10.2017 / 01:32
1
answer

Create a temporary file of select to repeat on other pages

Is it possible to do only a select query processing in php and mysql and use the result in pages that are continuations? Exemplo: Pagina 1 = faz select de dados, mostra o resultado e reserva. Pagina 1-1 = mostra o reservado Pagina 1-2 = mostra...
asked by 18.10.2017 / 13:14