Questions tagged as 'mysql'

2
answers

Nested query with if in mysql

I need to do a nested query but under one condition. You see, I have two tables. Tabla 1-> usuarios_administradores Tabla 2-> usuarios_colaboradores The table that presents the inconvenience is " agenda_eventos ". Agenda_eventos...
asked by 20.11.2018 / 21:18
1
answer

Bring related data from a table

I have 2 tables a types and the other plates which are the following: But I want to bring the type of that plate, how would I do it? example: I have a plate with id 1 and it has the id_type 2 , and I want t...
asked by 30.09.2018 / 20:03
2
answers

Find duplicate records, change them and return them only in MySQL

I have a problem, I have data from a table that is duplicated, inside are the following fields id, empresa, actividad, compañia I need the field empresa is unique, I generate a query to know how many and which are duplicates and I...
asked by 28.09.2018 / 16:59
3
answers

How can I connect to a web database from my PC?

Well this case had not been presented to me until now, it turns out that I have an acquaintance who bought a domain (from him) and separated me a space (so to speak) on his server. I have my web hosted, I'm just going to start developing what's...
asked by 22.09.2016 / 17:28
1
answer

Like statement with parameters

I have the following procedure: create procedure buscar( in producto) begin select nombre from producto where nombre like'%'+producto+'%' end but I get an error in the like try using create procedure buscar( in producto) b...
asked by 27.06.2018 / 12:43
2
answers

Mysql get all the records of related tables from many to many

I have 3 tables and I need to list all the options along with all the posts that have or do not have options, I have actually done it, but it is showing me only the posts that have options but those that do not have options do not show them to m...
asked by 28.06.2018 / 20:10
1
answer

How to use the LIKE with a DATE_FORMAT?

I have a query where I need to do a LIKE in WHERE indicating the current date. It's this: SELECT orden FROM tareas WHERE tipo = "Dos" AND (fechaCierre IS NULL OR fechaCierre LIKE DATE_FORMAT(NOW(), '%Y-%m-%d')) Of course,...
asked by 19.10.2018 / 11:00
2
answers

How to perform INNER JOIN with 3 tables using MySQL?

I have a question with a INNER JOIN query, in my Database I have 3 tables that are the following: Its structure is the following table educational_level be related to the grantee table and the grantee table is related to the grading...
asked by 18.10.2018 / 19:54
2
answers

Select non-NULL records within a CASE

You can help me with the following, I currently have a query from a table sql-server which brings me the records depending on a condition in WHERE and classifies those records into 4 categories which are' Contrato ',' Otrosies...
asked by 13.08.2018 / 15:57
2
answers

make consultation with three tables in Eloquent Laravel

I have three tables that are the following users , maps , bookmarks A user has several maps a map has several markers What I am trying to do is show the markers that belong to the maps of the user who has logged in. This is...
asked by 22.10.2018 / 16:47