I'm having problems with the next sentence:
INSERT INTO `pasajeros`
(
`nombre`,
`apellidos`,
`email`,
`password`,
`telefono`
)
VALUES
(
'Alexandra',
'Gonzalez',
'cesa@cesar3.com',
'1234567!',
'04242344556'
)
WHERE NOT EXISTS
(
SELECT *
FROM `transportistas`
WHERE `email` = 'cesa@cesar3.com'
);
What's wrong in my code? I need to make an Insert if a email is not used in another table. That was my approach, but I can't figure it out why my query fails.