Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8k PHP/5.3.0
Versión del cliente: mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $
extensión PHP: mysqli
Las consultas que probé son estas:
Código PHP:
CREATE VIEW union AS (SELECT * FROM blogs WHERE id_usuario = 1) UNION (SELECT * FROM noticias WHERE id_usuario = 1) UNION (SELECT * FROM ppoliticos WHERE id_usuario = 1)
Código PHP:
CREATE VIEW union AS
SELECT * FROM blogs WHERE id_usuario = 1
UNION SELECT * FROM noticias WHERE id_usuario = 1
UNION SELECT * FROM ppoliticos WHERE id_usuario = 1
Código PHP:
CREATE VIEW union AS
(SELECT * FROM blogs WHERE id_usuario = 1)
UNION
(SELECT * FROM noticias WHERE id_usuario = 1)
UNION
(SELECT * FROM ppoliticos WHERE id_usuario = 1)
Código:
Ya busqué por google y no pude encontrar ninguna solución. Alguien me puede dar una mano?#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'union AS (SELECT * FROM blogs WHERE id_usuario = 1) UNION (SELECT * FROM noticia' at line 1
MUCHAS GRACIAS!