Ver Mensaje Individual
  #10 (permalink)  
Antiguo 05/12/2013, 05:11
sologabriel
 
Fecha de Ingreso: septiembre-2013
Ubicación: chile
Mensajes: 41
Antigüedad: 10 años, 7 meses
Puntos: 1
Respuesta: recorrer una variable

( ! ) Notice: Undefined variable: cinco in C:\wamp\www\generadorarchivos\proceso\consultadigc ar\digcar.php on line 15 Call Stack # Time Memory Function Location
1 0.0009 142440 {main}( ) ..\pagina.php:0
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 ''SELECT * FROM tabla WHERE campo LIKE \''..'%\' ;'' at line 1

codigo

while($condicion_result=mysql_fetch_row($condicion ))
{//jua
$reparti=$condicion_result[0];
$descripcion=$condicion_result[1];
$resultado=substr($reparti,0, 5);

$queEmp1 ="'SELECT * FROM tabla WHERE codigo LIKE \''.$cinco.'%\' ;';";

$resEmp1 = mysql_query($queEmp1,$enlace_ext) or die(mysql_error());
$totEmp1 = mysql_num_rows($resEmp1);
echo $queEmp1;


if($totEmp1 == '1')
{
echo $descripcion;
}