Hi, I'm trying to make this query:
SELECT
consulta.id_consulta,actu_consulta.fecha_actu
FROM
consulta LEFT JOIN actu_consulta
ON consulta.id_consulta=actu_consulta.id_consulta_actu
And the funny thing is that this query in the workbench returns all the values.
And if I try it in the phpmyadmin it returns only the values in which the fecha_actu
is not null .
I would like to know what the problem is that is happening to me. Thanks
TABLES:
create table consulta
(id_consulta int not null auto_increment primary key,
codigo_web long,
usuario_creado int not null,
usuario_cerrado int,
fecha_creacion datetime,
fecha_cierre datetime,
estado_consulta boolean DEFAULT '0',
nombre varchar(15),
email varchar(50),
telf varchar(9),
localidad varchar(25),
idioma varchar(10),
descripcion text,
solucion text,
capacidad_aula int,
dia_alquiler varchar(10),
tipo_contacto varchar(10),
tipo_consulta varchar(10),
curso varchar(50),
cp varchar(10));
create table actu_consulta
(id_consulta_actu int not null auto_increment primary key,
id_usuario_actu int not null,
fecha_actu datetime,
descripcion text,
id_consulta int not null,
constraint fk_consulta_actu_consulta foreign key(id_consulta) references consulta(id_consulta));