hi, i have a mysql code that yesterday was working perfectly, but today it says that its wrong! here is the code:
and the error:

| Code: |
| $conexion = mysql_connect($host,$user,$pass);
if(!$conexion){ echo '<p style="font-size:large;">Conexión fallida</p>'; }else{ mysql_select_db('test'); $query = 'SELECT id, titulo, contenido, autor, fecha FROM avisos WHERE 1=id'; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ $titulo = $row['titulo']; $contenido = $row['contenido']; $autor = $row['autor']; } } mysql_close(); |
and the error:
| Code: |
| Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/alalex/domains/webot.frih.net/public_html/pumarin/avisos.php on line 123
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/alalex/domains/webot.frih.net/public_html/pumarin/avisos.php on line 128 |
