 
			
				17/10/2011, 19:54
			
			
			     |  
      |    |    |    Fecha de Ingreso: agosto-2011  
						Mensajes: 15
					  Antigüedad: 14 años, 2 meses Puntos: 0     |        |  
  |      Respuesta: Error en sintaxis        Solucione todo el tema anterior, y cambie un par d cosas en mi codigo, ahora me tira este error, no se si puede ser algo de incompatibilidad, no lo puedo solucionar..     Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\tarjetas\cal_viaje.php on line 23 
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 'WHERE tit_tarjeta=2147483647' at line 1         
<?php 
	include("conexion.php"); 
	$localidad=$_POST["sltLoc"]; 
?> 
<html> 
	<head> 
		<title>Calculando</title> 
	</head> 
	<body> 
		<?php   
			$consulta="SELECT tit_tarjeta, tit_documento, tit_nombre, tit_localidad FROM titulares WHERE tit_localidad='$localidad'"; 
			$res=mysql_query($consulta); 
			$comp=0; 
			$pago=0; 
			if($row=mysql_fetch_array($res)) 
			{ 
				$consulta2="SELECT com_fecha, com_cupon, com_importe FROM compras ORDER BY com_fecha WHERE tit_tarjeta=".$row['tit_tarjeta']; 
				//$consulta3="SELECT pag_fecha, pag_comprobante, pag_importe FROM pagos ORDER BY pag_fecha WHERE tit_tarjeta=". $row['tit_tarjeta']; 
				//echo "Titular: ".$row['tit_nombre']." \x1F \x1F \x1F \x1F \x1F Tarjeta: ".$row['tit_tarjeta'].""; //mostrar todos los datos 
				$res1=mysql_query($consulta2);   
					while($row1=mysql_fetch_array($res1)) 
					{ 
						//$comp = $comp + $row['com_importe']; 
					}       
						//while($row2=mysql_fetch_array($consulta3)) 
						//{ 
						//$pago = $pago + $row['pag_importe']; 
						//}     
			} 
				echo mysql_errno(); 
				echo mysql_error();   
		?> 
	</body> 
</html>           |