Warning: mysql_fetch_assoc(): 4 is not a valid MySQL result resource in /home/wwwteam/public_html/prueba/inc_not.php on line 72
Este es el codigo
Código PHP:
<?php require_once('Connections/azimut.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_azimut, $azimut);
$query_Recordset1 = "SELECT * FROM noticias";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $azimut) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
mysql_free_result($Recordset1);
$resumen = substr( $row_Recordset1['contenido'], 0 , 150);
?>
<link href="css/estilos.css" rel="stylesheet" type="text/css">
<?php do { ?>
<table width="387" border="0">
<tr>
<td width="11%" rowspan="2" align="center" valign="top"><img src="images2/<?php echo $row_Recordset1['imagen']; ?>" width="60" height="60"></td>
<td width="89%" class="titulo1"><?php echo $row_Recordset1['titulo']; ?></td>
</tr>
<tr>
<td valign="top" class="link3"><div align="justify"><?php echo $resumen; ?> ...</div>
<a href="ficha_not.php?id=<?php echo $row_Recordset1['id']; ?>" class="textoINDEX">Leer más</a></td>
</tr>
<tr>
<td height="25" colspan="2" align="center" valign="top"></td>
</tr>
</table>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<?php
mysql_free_result($Recordset1);
?>