tengo la siguiente consulta SQL:
Código:
Y me dal el siguiente error:SELECT m.id AS m__id, m.usuario_id AS m__usuario_id, m.receptor AS m__receptor, m.tipo AS m__tipo, m.titulo AS m__titulo, m.contenido AS m__contenido, m.estado AS m__estado, m.created_at AS m__created_at, m.updated_at AS m__updated_at FROM mensaje m WHERE m.titulo LIKE ? AND m.created_at >= ? AND m.created_at <= ? AND m.updated_at >= ? AND m.updated_at <= ?', array('%ya%', 'month' => '1', 'day' => '1', 'year' => '2007')
#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 '? AND m.created_at >= ? AND m.created_at <= ? AND m.updated_at >= ? AND m.update' at line 1
Código:
Alguna idea?Field Type Null Default Links to Comments MIME id bigint(20) No usuario_id int(11) Yes NULL sf_guard_user -> id receptor int(11) Yes NULL tipo tinyint(4) Yes NULL titulo varchar(100) Yes NULL contenido text Yes NULL estado tinyint(1) Yes NULL created_at datetime Yes NULL updated_at datetime Yes NULL
Un saludo
Javi