Questions tagged as 'mysql'

1
answer

Why do not relations work for me in Laravel 5.4.2?

Hello friends, my problem is the following, for some days now I have been planning the relations of the game that I am doing with PHP using Laravel 5.4 and the following problem arises when creating users: I have two Tables: users and charact...
asked by 14.08.2017 / 17:23
2
answers

How to insert data from a table by selecting data from another mysql table

I have the following code: if($_POST['id']=="id") { $nomb_idm=$_POST['nombre']; $n_idm=$_POST['id']; $nivel_ide=$_POST['nivel']; $pass_ide=$_POST['pass']; $correo_idm= $_POST['correo']; $usuario_ide= $_POST['usuario']; $idfto=$_POST['id...
asked by 11.08.2017 / 01:50
2
answers

How to accelerate very heavy MYSQL procedure based on loop (Mala praxis)

I have performed a procedure in a loop, but I find it quite precarious, which leads to a process too lenient to be MYSQL, about 15 minutes. The procedure is as follows DELIMITER \ CREATE DEFINER='root'@'localhost' PROCEDURE 'actualizarbase...
asked by 28.08.2017 / 13:02
1
answer

Improve the results of a select with LIKE

If I make a query of the type: SELECT nombre FROM tabla WHERE nombre LIKE '%foo%' How could you sort / filter the result so that, for example, the results that most match " foo " are displayed first? For example, if you had: " f...
asked by 23.08.2017 / 00:14
1
answer

Driver laravel does not update

I have a problem when I try to update the information, when I press the btn to edit the information, I load a view with the text fields that get information from the table, but when I edit them and try to submit, the request errors, for example...
asked by 19.04.2017 / 10:15
1
answer

Triggers in MySQL?

Greetings, I have a table called audit that contains the fields: - codigo_auditoria INT - fechahora_auditoria DATETIME - tabla_auditoria VARCHAR - operacion_auditoria VARCHAR - usuario_auditado VARCHAR - campo_actualizado VARCHAR...
asked by 25.03.2017 / 22:44
1
answer

MYSQL blocks the SELECT when executing an UPDATE in a trigger

This is the error I receive    SQLSTATE [HY000]: General error: 1442 Can not update table 'accounts_cobrate' in stored function / trigger because it is used by statement which invoked this stored function / trigger. If I use a static id i...
asked by 22.03.2017 / 15:19
2
answers

MySQL query How many children does Berenice have?

This is the Database and what I want to know is how to ask how many children Berenice has create database padres_hijos; use padres_hijos; create table padres(padre_id varchar (20) primary key, nombres varchar(30), apellidos varchar (30))eng...
asked by 14.10.2018 / 05:30
2
answers

Select in java MySQL

I do a function to verify if a plate exists in a table: 0 if it does not exist and 1 if it was found. However, I do not understand why I still know that there is, when I only have one record in the table public int buscarplaca(String placa)...
asked by 20.12.2016 / 01:55
5
answers

Order by not working - PHP

I have this table: I do this query to get sorted data and create a select : select id, nombre from usuarios_grupos ORDER BY 'nombre' ASC ... and this is the result, surprisingly does not order it . Before it worked...
asked by 11.01.2017 / 14:04