Ver Mensaje Individual
  #8 (permalink)  
Antiguo 06/12/2007, 09:53
jas1986
 
Fecha de Ingreso: diciembre-2007
Mensajes: 7
Antigüedad: 16 años, 4 meses
Puntos: 0
Re: problemas con PHP para listar datos por fecha

ola mira ahora tengo el codigo de esta manera:


$fecha_venta = $_POST['fecha_venta'];
echo $fecha_venta;
$sql = "SELECT * FROM venta WHERE fecha_venta=$fecha_venta";
$result=mysql_query($sql);
if ($row = mysql_fetch_array($result)){
echo "<table border = '1'> \n";
echo "<tr> \n";
echo "<td><b>tipo_producto</b></td> \n";
echo "<td><b>marca_producto</b></td> \n";
echo "<td><b>precio_producto</b></td> \n";
echo "<td><b>fecha_venta</b></td> \n";
echo "</tr> \n";
do {
echo "<tr> \n";
echo "<td>".$row["tipo_producto"]."</td> \n";
echo "<td>".$row["marca_producto"]."</td> \n";
echo "<td>".$row["precio_producto"]."</td>\n";
echo "<td>".$row["fecha_venta"]."</td>\n";
echo "</tr> \n";
} while ($row = mysql_fetch_array($result));
echo "</table> \n";
} else {
echo "¡ La base NO CONTIENE REGISTROS DE PRODUCTOS !";
}
?>

(solo necesito que me liste los productos que sean igual a la fecha que ingrese desde un formulario)

de ante mano muchas gracias a todos.