Foros del Web » Programando para Internet » PHP »

Left join

Estas en el tema de Left join en el foro de PHP en Foros del Web. Algien me puede ayudar con este codigo me dice que You have an error in your SQL syntax; check the manual that corresponds to your ...
  #1 (permalink)  
Antiguo 07/12/2015, 13:26
 
Fecha de Ingreso: octubre-2015
Ubicación: ciudad juarez
Mensajes: 90
Antigüedad: 8 años, 7 meses
Puntos: 1
Pregunta Left join

Algien me puede ayudar con este codigo me dice que

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 'FROM embobinado LEFT JOIN oven on embobinado.idtxemb = oven.idtxoven ' at line 2

Código PHP:
<?php
$mysqli 
= new mysqli("localhost""root""""eaton");
if (
$mysqli->connect_errno) {
    
printf("Connect failed: %s\n"$mysqli->connect_error);
    exit();
}
$id=$_POST['id'];
$consulta "SELECT embobinado.go,embobinado.schedule,embobinado.estilo, embobinado.idtxemb,oven.idtxoven,
            FROM embobinado LEFT JOIN oven on embobinado.idtxemb = oven.idtxoven
            WHERE idtxemb = '$id' and idtxoven='$id'"
;
$resuta=$mysqli->query($consulta) or die(mysqli_error($mysqli));
$raw =$resuta->fetch_object();
$go=$raw->go;
$schedule=$raw->schedule;
$estilo=$raw->estilo;
$idtx=$raw->idtxoven;



?>
  #2 (permalink)  
Antiguo 07/12/2015, 13:41
Avatar de Eleazan  
Fecha de Ingreso: abril-2008
Ubicación: Ibiza
Mensajes: 1.879
Antigüedad: 16 años
Puntos: 326
Respuesta: Left join

Te sobra la , delante del from...

Saludos
__________________
>> Eleazan's Source
>> @Eleazan

Etiquetas: join, left, mysql, select, sql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:07.