Foros del Web » Programando para Internet » PHP »

Como Manejar el Ancho de un texto dentro de la DB

Estas en el tema de Como Manejar el Ancho de un texto dentro de la DB en el foro de PHP en Foros del Web. HOLA AMIGOS, BUENO MI PREGUNTA ES ESTA. COMO PUEDO MANEJAR EL ANCHO DE UNA TABLA PARA KE ESTA NO SE ME ANANCHE Y SE MANTENGA ...
  #1 (permalink)  
Antiguo 20/01/2006, 07:15
Avatar de calavera  
Fecha de Ingreso: diciembre-2005
Mensajes: 113
Antigüedad: 18 años, 3 meses
Puntos: 0
Como Manejar el Ancho de un texto dentro de la DB

HOLA AMIGOS, BUENO MI PREGUNTA ES ESTA.

COMO PUEDO MANEJAR EL ANCHO DE UNA TABLA PARA KE ESTA NO SE ME ANANCHE Y SE MANTENGA FIJA, YA KE AL INGRESAR DATOS LO KE ME SUCEDE ES KE SI INGRESO MAS CAMPOS DE LOS NORMALES ESTA SE ME EMPIEZA A CORRER, LO CUAL ME GUSTARIA CAMBIARLO PARA KE ESTA HICHIERA UN SALTO DE LINEA CADA CIERTOS CARACTERES O CADA CIERTAS PALABRAS, PARA KE ASI SE MANTUVIERA FIJO EL ANCHO DE LA TABLA AL MOMENTO DE MOSTRAR LOS DATOS. ( EL CAMBIO ME GUSTARIA REALIZARLO EN DESCRIPCIÓN.)

EJ.:

Código PHP:
<?php
   
include("conex.php");
   
$link=Conectarse();
   
$result=mysql_query("select * from Equipos",$link);
   
   
   
$base="Test";
   
$link=mysql_connect("localhost","root");
   
mysql_select_db($base,$link);
   if (!isset(
$pg))
    
$pg 0// $pg es la pagina actual
    
$cantidad=10// cantidad de resultados por página
    
$inicial $pg $cantidad;

    
$pegar = ("SELECT * FROM Equipos ORDER BY Id_Equipos LIMIT $inicial,$cantidad");
    
$result mysql_db_query($base,$pegar) or die (mysql_error());

    
$contar = ("SELECT * FROM Equipos ORDER BY Id_Equipos"); 
    
$contarokmysql_db_query($base,$contar);
    
$total_records mysql_num_rows($contarok);
    
$pages intval($total_records $cantidad);
?>
<tr></tr>
 
<td width="800" height="28" valign="top">&nbsp;</td>
  </tr>
  <tr>
  <tr>
  <tr>
  </tr></tr></tr>
    
<TABLE width="800" height="44" BORDER=1 CELLPADDING="" CELLSPACING="">
  <!--DWLayoutTable-->
  <TR> 
    <td width="110" height="24"> <div align="justify">&nbsp;<font size="3"><strong>ACCIONES&nbsp;</strong></font></div></TD>
    <td width="64">&nbsp;</td>
    <td width="25">&nbsp;</td>
    <td width="38">&nbsp;</td>
    <td width="40">&nbsp;</td>
    <td width="46">&nbsp;</td>
    <td width="72">&nbsp;</td>
    <td width="114">&nbsp;</td>
    <td width="88">&nbsp;</td>
    <td width="98">&nbsp;</td>
    <td width="81">&nbsp;</td>
  <TR> 
    <td height="18"></td>
    <TD valign="top"><div align="left"><strong><font size="1"><font size="1">&nbsp;Id_Equipos</font></font></strong></div></TD>
    <TD valign="top"><div align="left"><strong><font size="1">&nbsp;Tipo</font></strong></div>
    <TD valign="top"><div align="left"><strong><font size="1">&nbsp;Marca&nbsp;</font></strong></div>
    <TD valign="top"><div align="left"><strong><font size="2"><font size="1">&nbsp;Modelo</font></font></strong></div>
    <TD valign="top"><div align="left"><strong><font size="1">&nbsp;N_Serie</font></strong></div></TD>
    <TD valign="top"><div align="justify"><strong><font size="1">&nbsp;Descripción</font></strong></div></TD>
    <TD valign="top"><div align="left"><strong><font size="1">Fecha_ Compra</font></strong></div></TD>
    <TD valign="top"><div align="left"><strong><font size="1">&nbsp;N_Factura</font></strong></div></TD>
    <TD valign="top"><div align="left"><strong><font size="1">&nbsp;Rut_ Proveedor</font></strong></div></TD>
    <TD valign="top"><div align="left"><strong><font size="1">&nbsp;Rut_Asignado</font></strong></div></TD>
  </TR>
  <?php       


echo("<form name='form1' method='post' action='BorraMultiple.php'>");
echo(
"<input name='submit' type='submit' value='Borrar Seleccionado'>");  
      
   while(
$row mysql_fetch_array($result)) { 

        echo (
"<tr><td><input type='checkbox' name='Id_Equipos[]' value='$row[Id_Equipos]'><a onclick='confirmDel();' href=\"BorradoSql.php?Id_Equipos=".$row["Id_Equipos"]."\">Eliminar</a>                                        
                </td><td>"
.$row["Id_Equipos"]."</td><td>".$row["Tipo"]."</td><td>".$row["Marca"]."</td>
                <td>"
.$row["Modelo"]."</td><td>".$row["N_Serie"]."</td><td>".$row["Descripcion"]."</td>
                <td>"
.$row["Fecha_Compra"]."</td><td>".$row["N_Factura"]."</td><td>".$row["Rut_Proveedor"]."</td>
                <td>"
.$row["Rut_Asignado"]."</td></tr>"); 
         } 
echo(
"</form>");

     
mysql_free_result($result); 
     
mysql_close($link);   
     
     
     echo (
"<p class=fonty center>"); 
     
                if (
$pg != 0) { 
                    
$url $pg 1
                        echo (
"<a href='$PHP_SELF?pg=".$url."'>&laquo;Anterior]</a>"); 
                              }
                              else { 
                                echo (
" "); 
                              } 
                    for (
$i 0$i <= $pages$i++) {
  if (
$i == $pg) {
    if (
$i == "0") {
      echo (
"<b> 1 </b>");
    }
    else {
      
$i $i+1;
      echo (
"<b> ".$i." </b>");
      
$i $i-1;
    }
  }
  else {
    if (
$i == "0") {
      echo (
"<a href='$PHP_SELF?pg=".$i."'>1</a> ");
    }
    else {
      echo (
"<a href='$PHP_SELF?pg=".$i."'>");
      
$i $i+1;
      echo (
" ".$i." </a>");
      
$i $i-1;
    }
  }
}  

                                            if (
$pg $pages) { 
                                            
$url $pg 1
                                            echo (
"<a href='$PHP_SELF?pg=".$url."'>[Siguiente&raquo;</a>"); 
                                                              }
                                                               else { 
                                                                echo (
" "); 
                                                                    } 
                                                                echo (
"</p>"); 
 
?>
  #2 (permalink)  
Antiguo 20/01/2006, 07:40
Avatar de carlosfocus  
Fecha de Ingreso: enero-2006
Ubicación: Venezuela
Mensajes: 823
Antigüedad: 18 años, 3 meses
Puntos: 0
trata manejando la tabla por pixeles y no por porcentaje, a mi no me ha pasado eso. pero trata de colocarla en pixeles a ver que sucede
__________________
Carlos Herrera
Web Developer
www.carlos.com.ve
Para descargar archivos propios a su Teléfono Mobil? www.carlosfocus.com
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:55.