Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/08/2010, 11:11
olberillo
 
Fecha de Ingreso: agosto-2010
Mensajes: 6
Antigüedad: 13 años, 8 meses
Puntos: 0
Banderas de registros o y 1. con php mysql

Hola Espero estén

Tengo un inconveniente y no se como diseñar ese tipo procesos.

La cuestion es que tengo unos datos que registro a traves de un formulario que envió a la base de datos. Entonces tengo un php que se llama user_general.php que es una consulta que hago en la base de datos y la despliego cuando entre el usuario. asi:
Código PHP:
<!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=iso-8859-1" />
<title>:: Notificaciones Generales ::</title>
</head>
<body>
<table width="100%" height="10%" border="1" align="center" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC" style="border: 1px solid #000000;">
  <tr width="10%" valign="middle" bordercolor="#999999" bgcolor="#CCCCCC">
    <td width="10%" align="center"><strong>Fecha</strong></td>
    <td width="15%" align="center"><strong>Juzgado</strong></td>
    <td width="7%" align="center"><strong>Radicacion</strong></td>
    <td width="15%" align="center"><strong>Tipo de Proceso</strong></td>
    <td width="25%" align="center"><strong>Demandante</strong></td>
    <td width="25%" align="center"><strong>Demandado</strong></td>
    <td width="3%" align="center" class="Estilo6"><font face="Chell Chrome" size="4">
      <p>&nbsp;</p>
      <p>
        <input type="checkbox" name="checkbox11" value="checkbox" onclick="ChequearTodos(this);" />
      </p>
    </font></td>
  </tr>
  <?php
//<td width="89" align="center"><span class="Estilo2"><font face="Chell Chrome" size="4">SELECCION</span></td>

$link=mysql_connect ("localhost","root","root")or print "Error en el proceso de conexion";
mysql_select_db("juridica",$link)or print "Error en la base de datos";

$sql "SELECT * FROM casos WHERE band=0 ORDER BY auto DESC limit 50" ;
$result mysql_query($sql$link);

if (
$row mysql_fetch_array($result)){
//echo "<table border = '1'> \n";
//Mostramos los nombres de las tablas
echo "<tr> \n";
mysql_field_seek($result,0);
$i=1;
while (
$field mysql_fetch_field($result)){
//echo "<td><b>$field->name</b></td> \n";
 
}
//echo "</tr> \n";
do {
//echo "<tr> \n";
?>
  <tr valign="middle" bgcolor="#CCCCCC">
    <td align="center" valign="top" class="Estilo2"><strong><?php echo $row["auto"];?></strong></td>
    <td align="left" valign="top" class="Estilo1"><?php echo $row["num_juzgado"];?></td>
    <td align="left" valign="top" class="Estilo2"><strong><?php echo $row["radicado"];?></strong></td>
    <td align="left" valign="top" class="Estilo3"><?php echo $row["tipo_proceso"];?></td>
    <td align="left" valign="top" class="Estilo3"><?php echo $row["demandante"];?></td>
    <td align="left" valign="top" class="Estilo3"><?php echo $row["demandado"];?></td>
    <td align="center"><input name="id[]" type="checkbox" value= "<?php echo $row["id"]; ?>" />
    </td>
    <?php 
$i
++;
} while (
$row mysql_fetch_array($result));
//echo "</table> \n";
}
?>
  </tr>
</table>
</body>
</html>
Tengo un campo band que tiene valor por defecto cuando lo envio a la base de datos que es 0 y quiero que cuando el user_general.php ejecute me reemplaze los valores de los registros que tengo en 1. Es como una especie de notificaciones o como funciona un mail. Esa es la logica que le coloqué. Si esta bien lo que hago? Me pueden colaborar con eso? Gracias.