Foros del Web » Programando para Internet » PHP »

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL

Estas en el tema de Warning: mysql_fetch_array(): supplied argument is not a valid MySQL en el foro de PHP en Foros del Web. que es lo que faltaria.. porq no tengo idea <?php $int_periodo=1; $enlace=mysql_connect("localhost:3306","root",""); mysql_select_db("db_evaluacion"); $str_sql_bus_pre = "CALL RHABuscar_Preguntas(".$int_periodo.",1,'A')"; $resultado=mysql_query($str_sql_bus_pre,$enlace); #echo $str_sql_bus_pre; $int_preguntas_a=0; while($preguntas = mysql_fetch_array($resultado) ) ...
  #1 (permalink)  
Antiguo 25/04/2008, 07:21
Avatar de eddyri21  
Fecha de Ingreso: abril-2008
Mensajes: 24
Antigüedad: 16 años
Puntos: 0
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL

que es lo que faltaria.. porq no tengo idea

<?php
$int_periodo=1;
$enlace=mysql_connect("localhost:3306","root","");
mysql_select_db("db_evaluacion");
$str_sql_bus_pre = "CALL RHABuscar_Preguntas(".$int_periodo.",1,'A')";
$resultado=mysql_query($str_sql_bus_pre,$enlace);
#echo $str_sql_bus_pre;
$int_preguntas_a=0;
while($preguntas = mysql_fetch_array($resultado) ) {

echo "
<tr>
<td colspan='2' rowspan='13' align='center' valign='top'></td>
<td height='21'><div align='center'><strong>".$preguntas['indice']."</strong></div></td>
<td width='368'>".$preguntas['preguntas']."</td>
<td width='14'>&nbsp;</td>
<td colspan='2' valign='middle' align='center'><input name='pregunta_a[".$int_preguntas_a."]' type='radio' value='1'></td>
<td valign='middle' align='center'><input name='pregunta_a[".$int_preguntas_a."]' type='radio' value='2'></td>
<td valign='middle' align='center'><input name='pregunta_a[".$int_preguntas_a."]' type='radio' value='3'></td>
<td valign='middle' align='center'><input name='pregunta_a[".$int_preguntas_a."]' type='radio' value='4'></td>
<td colspan='2' valign='middle' align='center'><input name='pregunta_b[".$int_preguntas_a."]' type='radio' value='5'></td><input type='hidden' name='cod_pre_a[".$int_preguntas_a."]' value='".$preguntas['codigo']."' >
</tr>";
$int_preguntas_b++;
}
?>


GRACIAS!
  #2 (permalink)  
Antiguo 25/04/2008, 08:03
Avatar de jago86  
Fecha de Ingreso: abril-2008
Ubicación: Ibarra - Ecuador
Mensajes: 77
Antigüedad: 16 años
Puntos: 1
Re: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL

Pon la linea de la consulta asi para ver si te devuelve algun error en la misma,
$resultado=mysql_query($str_sql_bus_pre,$enlace) or die (mysql_error());
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 06:40.