Questions tagged as 'join'

1
answer

Double LEFT JOIN to a table does not work when one field is NULL and the other does not

For days I have been thinking about the following question: SELECT U.Usuario AS Nombre, S.Nombre AS Sombrero, A.Nombre AS Arma, Z.Nombre AS Zona, R.Nivel, rangoRollo(R.Honor, R.ID_Usuario) AS Rango FROM Usuarios AS U...
asked by 10.03.2018 / 19:20
1
answer

search database using JOIN SQL PHP

function listUser($conexion){ //funcion de busqueda $consulta = (mysqli_query($conexion, "SELECT *, p.nombre as personaNombre, p.id as idPersona, d.nombre as nombreDepartamento, u.id as idUsuario, u.nombre as nombreUsuario...
asked by 23.03.2018 / 14:38
2
answers

How to select an inner join with multiple rows?

I have a Query with which I try to bring several values with a single inner join, but the question is that it brings me the different values as rows, therefore I repeat data, what I want is to make a selection of each value that bring the inner...
asked by 15.02.2018 / 17:43
0
answers

Translate syntax join from oracle 8i to new syntax

Hi, could you help me with the translation of this query? apparently a join is made to the same table but I'm not sure. select a.id_proc from Tabla1 a, Tabla1 b where a.id_status = 0 and a.id_proc = b.id_proc(+) and b.id_status(+) = -1 and b...
asked by 15.02.2018 / 18:13
1
answer

Multiple rows of a join of two records

In a union of two tables where the main table is of type: Table A A.row_Id, A.link_Id and the secondary one is of the type: Table B B.link_Id, B.Valor_a1, B.Valor_a2, B.Valor_b1, B.Valor_b2, B.Valor_c1, B.Valor_c2, B.Valor_d1, B.Valor...
asked by 05.02.2018 / 17:31
1
answer

Error in json ajax and codeigniter using join

I have a modal window that I want to show the product information, but the table in the database has two fields that store the id instead of the name. Example the product table Code = 123456 Name = Product 1 Category = 1 - > there are anot...
asked by 05.01.2018 / 06:13
1
answer

I have problems ordering from top to bottom my join with query builder

I have problems ordering the query from highest to lowest by the date "created_at" it does not throw error and if it shows me the data of the query but only it does not order them you are the code $listado = DB::table('lotes')->join('produc...
asked by 22.11.2017 / 20:30
2
answers

Operation of a right or left in multiple join (Postgres)

I am trying to create a query for a library database that meets the following requirements: the number of books written by authors of Spanish nationality who they lived in the second half of the 20th century by editorial, together with the name...
asked by 19.10.2017 / 19:49
1
answer

I have a problem with Fullcalendar and the INNER JOIN framework Codeigniter

Already update my publication, I already recognize the id of the project and I do the JOIN well, in an alert you can see the result of the query, I already painted the calendar but as if it were empty. The phases do not place them. What I int...
asked by 31.07.2017 / 17:59
1
answer

show in twig the result of a JOIN query in Symfony

I have 2 tables which are not related by ORM so I do the JOIN in the following way: $dql="Select u, o from BackendBundle:Orders o JOIN BackendBundle:Users u WITH o.userid=u.id"; $query=$em->createQuery($dql);...
asked by 01.08.2017 / 19:39