Dreamweaver - GRILLA DE CON DATOS CAMBIA SU LONGITUD

 
Vista:

GRILLA DE CON DATOS CAMBIA SU LONGITUD

Publicado por claudio (16 intervenciones) el 23/08/2012 15:46:16
Hola, soy nuevo en el foro, y mi inguietud es la siguiente:

Tengo un formulario vinculada con un tabla de una base de datos, cuyo datos muestro en una tabla con una consulta sql, el tema es que nose porque, me cambia la longitud de las celdas de la tabla, si por ejemplo, el campo apellido, esta mas o menos completos, que los registros de la tabla de la base datos



Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de xve
Val: 96
Oro
Ha mantenido su posición en Dreamweaver (en relación al último mes)
Gráfica de Dreamweaver

GRILLA DE CON DATOS CAMBIA SU LONGITUD

Publicado por xve (369 intervenciones) el 23/08/2012 20:55:35
Hola Claudio, no te entiendo muy bien... nos puedes mostrar el código?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

GRILLA DE CON DATOS CAMBIA SU LONGITUD

Publicado por claudio (16 intervenciones) el 24/08/2012 13:00:29
Te paso el codigo, la verdad no se cual debe ser el error, pero me pone de mal humor!!!!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php require_once('Connections/conexionfisico.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  if (PHP_VERSION < 6) {
    $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_jugadores = 10;
$pageNum_jugadores = 0;
if (isset($_GET['pageNum_jugadores'])) {
  $pageNum_jugadores = $_GET['pageNum_jugadores'];
}
$startRow_jugadores = $pageNum_jugadores * $maxRows_jugadores;
 
mysql_select_db($database_conexionfisico, $conexionfisico);
$query_jugadores = "SELECT * FROM jugadores  ORDER BY jugadores.APELLIDO";
$query_limit_jugadores = sprintf("%s LIMIT %d, %d", $query_jugadores, $startRow_jugadores, $maxRows_jugadores);
$jugadores = mysql_query($query_limit_jugadores, $conexionfisico) or die(mysql_error());
$row_jugadores = mysql_fetch_assoc($jugadores);
 
if (isset($_GET['totalRows_jugadores'])) {
  $totalRows_jugadores = $_GET['totalRows_jugadores'];
} else {
  $all_jugadores = mysql_query($query_jugadores);
  $totalRows_jugadores = mysql_num_rows($all_jugadores);
}
$totalPages_jugadores = ceil($totalRows_jugadores/$maxRows_jugadores)-1;
 
mysql_select_db($database_conexionfisico, $conexionfisico);
$query_todos = "SELECT jugadores.APELLIDO FROM jugadores, club, mediciones, v_club_jugadores ORDER BY jugadores.CODIGO_JUGADOR";
 
$todos = mysql_query($query_todos, $conexionfisico) or die(mysql_error());
$row_todos = mysql_fetch_assoc($todos);
$totalRows_todos = mysql_num_rows($todos);
?>
<style type="text/css">
body,td,th {
	font-family: "Courier New", Courier, monospace;
	font-size: 16px;
	color: #03F;
}
body {
	background-color: #FFF;
}
</style>
 
<form action="" method="get">
  <table width="2629" border="1">
    <tr bgcolor="#6699FF">
      <th width="427" scope="col">Apellido</th>
      <th width="139" scope="col">Nacimiento</th>
      <th width="127" scope="col">DNI</th>
      <th width="468" scope="col">Calle</th>
      <th width="61" scope="col">Nro</th>
      <th width="129" scope="col">Piso</th>
      <th width="92" scope="col"><p>Depto</p></th>
      <th width="170" scope="col">Localdiad</th>
      <th width="201" scope="col">Provincia</th>
      <th width="116" scope="col">Obra Social</th>
      <th width="178" scope="col">Email</th>
      <th width="197" scope="col">Club</th>
      <th width="67" scope="col">Presion</th>
      <th width="59" scope="col">Altura</th>
      <th width="77" scope="col">Fecha Medicion</th>
      <th width="21" scope="col">&nbsp;</th>
    </tr>
  </table>
</form>
<?php do { ?>
  <table width="2209" border="1" cellspacing="10">
    <tr>
      <td width="410" scope="col"><div align="left"><?php echo $row_jugadores['APELLIDO']; ?></div></td>
      <th width="137" scope="col"><div align="left"><?php echo $row_jugadores['NACIMIENTO']; ?></div></th>
      <th width="123" scope="col"><div align="left"><?php echo $row_jugadores['DNI']; ?></div></th>
      <th width="461" scope="col"><div align="left"><?php echo $row_jugadores['CALLE']; ?></div></th>
      <th width="88" scope="col"><div align="left"><?php echo $row_jugadores['NRO']; ?></div></th>
      <th width="88" scope="col"><div align="left"><?php echo $row_jugadores['PISO']; ?></div></th>
      <th width="95" scope="col"><div align="left"><?php echo $row_jugadores['DPTO']; ?></div></th>
      <th width="147" scope="col"><div align="left"><?php echo $row_jugadores['LOCALIDAD']; ?></div></th>
      <th width="142" scope="col"><div align="left"><?php echo $row_jugadores['PROVINICA']; ?></div></th>
      <th width="165" scope="col"><div align="left"><?php echo $row_jugadores['OBRA_SOCIAL']; ?></div></th>
      <th width="157" scope="col"><div align="left"><?php echo $row_jugadores['EMAIL']; ?></div></th>
      <th width="1" scope="col"><div align="left"></div></th>
      <th width="1" scope="col"><div align="left"></div></th>
    </tr>
  </table>
  <?php } while ($row_jugadores = mysql_fetch_assoc($jugadores)); ?>
<p>&nbsp;</p>
<p>&nbsp;</p>
<?php
mysql_free_result($todos);
 
mysql_free_result($jugadores);
?>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de xve
Val: 96
Oro
Ha mantenido su posición en Dreamweaver (en relación al último mes)
Gráfica de Dreamweaver

GRILLA DE CON DATOS CAMBIA SU LONGITUD

Publicado por xve (369 intervenciones) el 24/08/2012 16:47:09
Hola Claudio, estas utilizando tablas, por lo que si algún valor es superior a la anchura de la celda, esta aumentara de tamaño a no ser que le indiques lo contrario mediante estilos.

revisa el estilo overflow, esto ara que si te aumenta de tamaño el contenido no se mostrara... siempre lo he utilizado con div's pero creo que también funciona con tablas.

por ejemplo:
1
TD {overflow:hidden;}

Coméntanos, ok?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

GRILLA DE CON DATOS CAMBIA SU LONGITUD

Publicado por claudio (16 intervenciones) el 28/08/2012 16:02:54
Muchas gracias voy a probar y despues te cuento!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

GRILLA DE CON DATOS CAMBIA SU LONGITUD

Publicado por claudio (16 intervenciones) el 21/09/2012 16:24:14
Funciona bien,! gracias
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar