Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/05/2008, 21:38
Avatar de Capimaster
Capimaster
 
Fecha de Ingreso: agosto-2004
Mensajes: 494
Antigüedad: 19 años, 8 meses
Puntos: 2
Problema al ordenar las tablas

Bien pues espero ser claro con mi pregunta y espero alguien me pueda echar una manita...

Bien ya casi termino de dasarrollar una Base de datos que me facilitara mucho el trabajo

Código PHP:
<?php require_once('../Connections/portadas.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_mostrar 18;
$pageNum_mostrar 0;
if (isset(
$_GET['pageNum_mostrar'])) {
  
$pageNum_mostrar $_GET['pageNum_mostrar'];
}
$startRow_mostrar $pageNum_mostrar $maxRows_mostrar;

mysql_select_db($database_portadas$portadas);
$query_mostrar "SELECT * FROM portadas ORDER BY id DESC";
$query_limit_mostrar sprintf("%s LIMIT %d, %d"$query_mostrar$startRow_mostrar$maxRows_mostrar);
$mostrar mysql_query($query_limit_mostrar$portadas) or die(mysql_error());
$row_mostrar mysql_fetch_assoc($mostrar);

if (isset(
$_GET['totalRows_mostrar'])) {
  
$totalRows_mostrar $_GET['totalRows_mostrar'];
} else {
  
$all_mostrar mysql_query($query_mostrar);
  
$totalRows_mostrar mysql_num_rows($all_mostrar);
}
$totalPages_mostrar ceil($totalRows_mostrar/$maxRows_mostrar)-1;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
body,td,th {
    font-family: Segoe UI, Arial, Times New Roman;
    font-size: 11px;
}
-->
</style></head>

<body>
<table border="0" cellpadding="0" cellspacing="1">
  <?php do { ?>
    <tr>
      <td><table width="205" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td background="/eventos/<?php echo $row_mostrar['galeria']; ?>/thumbnails/<?php echo $row_mostrar['archivo']; ?>"><a href="/eventos/<?php echo $row_mostrar['galeria']; ?>/index.html" target="_blank"><img src="/TOP/gallery/top.gif" width="214" height="178" border="0" /></a></td>
        </tr>
        <tr>
          <td height="109" background="/TOP/gallery/foot.jpg"><table width="96%" border="0" align="right" cellpadding="0" cellspacing="0">
              <tr>
                <td><div align="center"><strong><?php echo $row_mostrar['titulo']; ?></strong></div></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><div align="center"><?php echo $row_mostrar['fecha']; ?></div></td>
              </tr>
              <tr>
                <td><div align="center"><?php echo $row_mostrar['lugar']; ?></div></td>
              </tr>
              <tr>
                <td><div align="center">Fotos por: <?php echo $row_mostrar['fotos']; ?></div></td>
              </tr>
            </table>
              <p align="center">&nbsp;</p></td>
        </tr>
      </table></td>
      <td><table width="205" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td background="/eventos/<?php echo $row_mostrar['galeria']; ?>/thumbnails/<?php echo $row_mostrar['archivo']; ?>"><a href="/eventos/<?php echo $row_mostrar['galeria']; ?>/index.html" target="_blank"><img src="/TOP/gallery/top.gif" width="214" height="178" border="0" /></a></td>
        </tr>
        <tr>
          <td height="109" background="/TOP/gallery/foot.jpg"><table width="96%" border="0" align="right" cellpadding="0" cellspacing="0">
              <tr>
                <td><div align="center"><strong><?php echo $row_mostrar['titulo']; ?></strong></div></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><div align="center"><?php echo $row_mostrar['fecha']; ?></div></td>
              </tr>
              <tr>
                <td><div align="center"><?php echo $row_mostrar['lugar']; ?></div></td>
              </tr>
              <tr>
                <td><div align="center">Fotos por: <?php echo $row_mostrar['fotos']; ?></div></td>
              </tr>
            </table>
              <p align="center">&nbsp;</p></td>
        </tr>
      </table></td>
      <td><table width="205" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td background="/eventos/<?php echo $row_mostrar['galeria']; ?>/thumbnails/<?php echo $row_mostrar['archivo']; ?>"><a href="/eventos/<?php echo $row_mostrar['galeria']; ?>/index.html" target="_blank"><img src="/TOP/gallery/top.gif" width="214" height="178" border="0" /></a></td>
        </tr>
        <tr>
          <td height="109" background="/TOP/gallery/foot.jpg"><table width="96%" border="0" align="right" cellpadding="0" cellspacing="0">
              <tr>
                <td><div align="center"><strong><?php echo $row_mostrar['titulo']; ?></strong></div></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><div align="center"><?php echo $row_mostrar['fecha']; ?></div></td>
              </tr>
              <tr>
                <td><div align="center"><?php echo $row_mostrar['lugar']; ?></div></td>
              </tr>
              <tr>
                <td><div align="center">Fotos por: <?php echo $row_mostrar['fotos']; ?></div></td>
              </tr>
            </table>
              <p align="center">&nbsp;</p></td>
        </tr>
      </table></td>
    </tr>
    <?php } while ($row_mostrar mysql_fetch_assoc($mostrar)); ?>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result
($mostrar);
?>
este es el link para que vean...

http://www.elcapitolio.net/eventos/mostrar.php

El problema es que yo quiero que me acomode las tablas en 3 columnas pero creo que no se nada acerca de como hacerlo por que me repite la misma galeria en las 3 columnas y las muestr pero para abajo..

ojala me puedan ayudar

Les muestro cual quisiera que fuera el resultado ya terminando mi Base de datos

http://www.elcapitolio.net/eventos/
Muchas Gracias
__________________
http://www.elcapitolio.com.mx - Ocotlán, Jalisco, México