Questions tagged as 'mysql'

0
answers

Delete line according to the difference of dates in MySQL

I'm trying to delete rows from a table using the difference between the current date and the date the row was registered as a reference. Here's my code: DELETE FROM lixeira WHERE diferenca > 60 IN ( SELECT DATEDIFF('2018-11-20',data_exc...
asked by 20.11.2018 / 20:59
1
answer

Trigger executes case value of a column is 'Database I'

Create a trigger that automatically enrolls a student in "BD I Laboratory" as soon as it is enrolled in "Database I". use Universidade; insert into Realiza_matricula (RGAacad, Nomedisc) values(20179474911, 'Banco de Dados I'); Delimiter...
asked by 20.11.2018 / 18:37
0
answers

Performance FULLTEXT SEARCH (MySql) between multiple tables

Hello! I have a problem that someone here may have solved. First of all, I want to try an WITHOUT USING ElasticSearch solution or something. Come on: I have a bank with approximately 40 tables that have the same columns. One of these column...
asked by 20.11.2018 / 13:01
0
answers

Error creating TRIGGER MYSQL

Can anyone tell me where I'm wrong on Trigger below? create procedure cons_agen (in prof_mat int) begin select p.nome_prof, c.nome_curso, l.nome_lab, a.inicio, a.fim from agendamento a inner join professor p on a.id_profs=p.matricula_prof inne...
asked by 20.11.2018 / 13:09
2
answers

MySQL error "expects parameter 1 to be resource, boolean given in"

$query = "Select * from servico where ID_SERVICO = $id"; $result = mysql_query($query); if($row = mysql_fetch_array($result)) { $nome = $row['NOME']; if($nome == 'Marketing') { include ("servicos/marketing.php"); }...
asked by 07.08.2014 / 19:13
0
answers

Codeigniter- Query in the database always returning null

The getlocal function that is a query in the database is always returning null even after I do an insert in the database file denuncia_model.php class denuncia_model extends CI_Model { function __construct(){ parent::__construct(); } p...
asked by 17.11.2018 / 02:27
1
answer

How to determine the type of data to use in this flexible case?

The project consists of a database for RPG tokens (D & D and similar). It looks like this:    Database   tab       Tables       character    system    raca    class    attribute    character_atribution    Relationships      ...
asked by 16.11.2018 / 23:23
2
answers

Image Inclusion in Database - LongBlob

I am coding a simple register, where it needs to also record in the database a photo, which should be from the tibo BLOB. This is my Person Class: public class Pessoa { private Integer idPessoa; private String nome; private Dat...
asked by 17.11.2018 / 16:01
0
answers

Error in database insertion using JDBC

So guys, I'm trying to insert into a table (My database is using 3 tables), and for some reason in the stores_products table the insert is not performed. Here is the error:    t com.mysql.cj.jdbc.exceptions.SQLError.createSQLException (SQLErr...
asked by 14.11.2018 / 22:28