[Help] MySQL Error: Unknown column in 'field list'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Help] MySQL Error: Unknown column in 'field list'

    Hey guys I have a problem with MySQL, i'm trying to insert data in a table but it's returning this error message

    Fatal error: SQL: SELECT e.idtarea AS 'idTarea', e.detalle AS 'detalle', e.precio AS 'precio', e.idor AS 'idOrdenReparacion', e.fecha AS 'fecha', concat( 'Editar ', 'Eliminar' ) AS Opciones FROM Tarea e WHERE e.idtarea like '%%' ORDER BY e.idtarea;, Error: Unknown column 'e.idor' in 'field list' in /opt/lampp/htdocs/scep/tareas.php on line 76
    Here is my code

    $SQL="

    SELECT e.idtarea AS 'idTarea', e.detalle AS 'detalle', e.precio AS 'precio', e.idor AS 'idOrdenReparacion', e.fecha AS 'fecha',

    concat(

    '<a href=\'editarTarea.php?id=',e.idtarea,'\'>Editar</a>&nbsp;',

    '<a href=\'eliminarTarea.php?id=',e.idtarea,'\' onclick=javascript:confirm(\'Eliminar?\')>Eliminar </a>'

    ) AS Opciones

    FROM Tarea e ".$FILTRAR_POR." ORDER BY e.idtarea;";


    $RESULT = mysql_query($SQL) or trigger_error("SQL: $SQL, Error: " . mysql_error(), E_USER_ERROR);
    Table Tarea from database

    CREATE TABLE IF NOT EXISTS `Tarea` (
    `idTarea` int(11) NOT NULL AUTO_INCREMENT,
    `detalle` varchar(45) COLLATE latin1_danish_ci DEFAULT NULL,
    `precio` varchar(45) COLLATE latin1_danish_ci DEFAULT NULL,
    `idOrdenReparacion` int(11) NOT NULL DEFAULT '0',
    `fecha` date DEFAULT NULL,
    PRIMARY KEY (`idTarea`,`idOrdenReparacion`),
    KEY `fk_Tarea_OrdenReparacion1_idx` (`idOrdenReparacion`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_danish_ci AUTO_INCREMENT=2 ;


    .....

    ALTER TABLE `Tarea`
    ADD CONSTRAINT `fk_Tarea_OrdenReparacion1` FOREIGN KEY (`idOrdenReparacion`) REFERENCES `OrdenReparacion` (`idOrdenReparacion`) ON DELETE NO ACTION ON UPDATE NO ACTION;


    Please help!

    #2
    create table e.detalle (something TYPE)
    Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

    Comment

    Working...
    X