Tema: Left join
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/12/2015, 13:26
edgaralcalaserra
 
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;



?>