Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/12/2012, 09:10
yolanda16568
 
Fecha de Ingreso: agosto-2011
Mensajes: 165
Antigüedad: 12 años, 8 meses
Puntos: 1
problema de variable

<table width="99%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="50%"><span class="letra">Categorias</span>
<strong>
<?php if($_SESSION['MM_UserGroup']=="admin"){
?>
<a href="insectar categoria.php?nombre_user=<?php echo $row_usuarios['nombre_user']; ?>">Insectar_categoria
<?php } ?>
</a></strong></td>
<td width="26%" align="center"><span class="centro3">Publicaciones totales</span></td>
<td width="24%" align="center"><span class="centro3">Ultimo Post</span></td>
</tr>
<?php do { ?>

<?php
mysql_select_db($database_libre, $libre);
$publicacion_sql = "SELECT mensaje FROM mensajes WHERE tema = " .
$row_temas['id_tema'];
$ultimo_sql = "SELECT autor,fecha FROM mensajes WHERE tema = " .
$row_temas['id_tema'] . " ORDER BY fecha DESC LIMIT 1";
$uPost = mysql_query($ultimo_sql) or die(mysql_error ());
$pTotales = mysql_query($publicacion_sql) or die(mysql_error());
?>
<tr>
<td><a href="categorias.php?id_categorias=<?php echo $row_categorias['id_categoria']; ?>&amp;nombre_user=<?php echo $row_usuarios['nombre_user']; ?>"><strong><?php echo $row_categorias['nombre']; ?></strong></a><strong><a href="insectar categoria.php?nombre_user=<?php echo $row_usuarios['nombre_user']; ?>">
<?php if($_SESSION['MM_UserGroup']=="admin"){
?>
</a><a href="borrar_confirma.php?nombre_user=<?php echo $row_usuarios['nombre_user']; ?>">Eliminar </a><a href="insectar categoria.php?nombre_user=<?php echo $row_usuarios['nombre_user']; ?>">
<?php } ?>
</a><a href="editar_categoria.php?nombre_user=<?php echo $row_usuarios['nombre_user']; ?>&amp;categoria=<?php echo $row_categorias['id_categoria']; ?>">
<?php if($_SESSION['MM_UserGroup']=="admin"){
?>
Editar</a><a href="borrar_confirma.php?nombre_user=<?php echo $row_usuarios['nombre_user']; ?>">
<?php } ?>
</a></strong><br />
Descricion: <?php echo $row_categorias['descripcion']; ?></td>


<td align="center"><?php echo mysql_num_rows($pTotales);?></td>
<td align="center"><?php $up = mysql_fetch_assoc($uPost);
echo $up {'fecha'};
echo '<br/>';
echo $up {'autor'};?></td>





</tr>
<?php } while ($row_categorias = mysql_fetch_assoc($categorias)); ?>
</table>

Me da este error:

Notice: Undefined variable: row_temas in C:\xampp\htdocs\libre\acceso.php on line 233

Notice: Undefined variable: row_temas in C:\xampp\htdocs\libre\acceso.php on line 235
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 'ORDER BY fecha DESC LIMIT 1' at line 1

Alguien lo puede corregir porfavor