Autor Tema: AYUDA: Repeat Area Horizontal  (Leído 540 veces)

Desconectado kalash

  • PHPerit@
  • *
  • Mensajes: 32
  • Karma: 0
    • Ver Perfil
AYUDA: Repeat Area Horizontal
« en: 07 de Diciembre de 2007, 16:38:30 pm »
disculpen alguien sabria como hacer una tabla 3 x 3 y q esta se rellene con los campos de una columna extraiga de la base de datos por ejemplo la columna imagen

imagen1 imagen2 imagen3
imagen4 imagen5 imagen6

de antemano gracias!!!!

este es mi codigo al q quiero aplicarle eso


<?php require_once(&#39;Connections/connect.php&#39;); ?>
<?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 != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "&#39;" doubleval($theValue) . "&#39;" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

$maxRows_Recordset1 3;
$pageNum_Recordset1 0;

if (isset(
$_GET[&#39;pageNum_Recordset1&#39;])) {
  
$pageNum_Recordset1 $_GET[&#39;pageNum_Recordset1&#39;];
}
$startRow_Recordset1 $pageNum_Recordset1 $maxRows_Recordset1;

mysql_select_db($database_connect$connect);
$query_Recordset1 "SELECT imagen FROM marca ORDER BY nombre ASC";
$query_limit_Recordset1 sprintf("%s LIMIT %d, %d"$query_Recordset1$startRow_Recordset1$maxRows_Recordset1);
$Recordset1 mysql_query($query_limit_Recordset1$connect) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);

if (isset(
$_GET[&#39;totalRows_Recordset1&#39;])) {
  
$totalRows_Recordset1 $_GET[&#39;totalRows_Recordset1&#39;];
} else {
  
$all_Recordset1 mysql_query($query_Recordset1);
  
$totalRows_Recordset1 mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="48%"><table border="0" cellpadding="2" cellspacing="2">
      <tr>
        <td>imagen</td>
      </tr>
      <?php do { ?>
      <tr>
        <td><a href="#" onClick="window.open(&#39;ficha_pr.php?id_marca=<?=$id_marca;?>;&#39;,&#39;verimagen&#39;, &#39;width=400,height=400&#39;); return false;"><img src="images/<?php echo $row_Recordset1[&#39;imagen&#39;]; ?>" width="200" height="200" class="bordeimg" /></a></td>
      </tr>
      <?php } while ($row_Recordset1 mysql_fetch_assoc($Recordset1)); ?>
    </table></td>
    <td width="48%">&nbsp;</td>
    <td width="4%">&nbsp;</td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result
($Recordset1);
?>

Comunidad PHPeros

AYUDA: Repeat Area Horizontal
« en: 07 de Diciembre de 2007, 16:38:30 pm »