Cuando tenía un sitio web en Windows no me envíaba errores, ahora que pasamos a Linux nos pasa el siguiente error "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in ..... "
El código es el siguiente
Código:
¿Saben como solucionarlo? <? $cnnList = mysql_connect($CONN_HOST, $CONN_USER, $CONN_PASS); mysql_select_db($CONN_DATABASE, $cnnList); $strSQL = "SELECT ID_Obra, Obra, Foto " . "FROM tbObras " . "WHERE Mostrar = '1' AND FechaEntrega = '0000-00-00' " . "ORDER BY FechaInicio LIMIT 0, " . MAXOBRASPORTADA . ";"; $rstList = mysql_query($strSQL, $cnnList); if (mysql_num_rows($rstList) > 0) { ?> <table width="250" border="0" cellspacing="8" cellpadding="0"> <tr> <? $i = 0; while ($recList = mysql_fetch_assoc($rstList)) { if (($i % MAXOBRASPORFILAPORTADA) == 0) { echo "</tr><tr>"; } $i++; $lngID_Obra = $recList["ID_Obra"]; $strObra = $recList["Obra"]; $strFoto = $recList["Foto"]; ?> <td width="50%" valign="top"><table border="0" cellpadding="2" cellspacing="0" class="destacados"> <tr valign="top"> <td width="108" height="60" bgcolor="#F0F0F0"><a href="obras/ver_obra.php?id=<?= $lngID_Obra ?>"><img src="thumb.php?img=<?= UPLOAD_DIR_OBRAS . "/" . $strFoto ?>&w=108&h=60" alt="<?= str_replace('"', '"', $strObra) ?>" width="108" height="60" hspace="4" vspace="4" border="1" style="border-color: #000000;" /></a></td> </tr> <tr valign="top"> <td><img src="imagenes/estructura/icono-destacados.gif" width="19" height="11" /><a href="obras/ver_obra.php?id=<?= $lngID_Obra ?>"><?= $strObra ?></a></td> </tr> </table></td> <? } ?> </tr> </table> <? } else { ?> <p class="texto">No se ha encontrado nuevos proyectos.</p> <? } mysql_close ($cnnList); ?>