Ver Mensaje Individual
  #6 (permalink)  
Antiguo 22/10/2010, 10:34
Avatar de JoseGMariani
JoseGMariani
 
Fecha de Ingreso: diciembre-2008
Ubicación: Edo Lara
Mensajes: 251
Antigüedad: 17 años, 9 meses
Puntos: 8
Respuesta: Ayuda! establecer LIMIT por post o get, en consulta

me slae un error.. =( ... este es el error:
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 '' at line 1

mi codigo es :

Código PHP:
<?
include ('../conexion.php');
$mail2 = "miemail.com";
$asunto = $_POST["asunto"];
$text = $_POST["text"];
$ban=null;
$no=0;
$actualizar=1;
      
$ssql="select email, id from usuarios where estado='$ban' AND msj='$no' LIMIT ".$_get['limit'];
  
$result=mysql_query($ssql) or die(mysql_error()); 
  
$registros=mysql_num_rows($result);
if (
$registros != 0) {
 
//aqui empieza.
       
while ($fila=mysql_fetch_array($result)){
    
$para =$fila["email"];      
    
$id = $fila["id"];  
    
echo 
"$id"; 
echo 
"$email";
}
mail($para, $asunto, utf8_decode($mensaje), $header); 
$ssql = "update usuarios set msj='$actualizar' where id='$id'"; 
}
mysql_close();
?>
__________________
"Nunca seas arrogante con los humildes, ni humilde con los arrogantes." Paulo Coelho..